The Java Programming Test Quiz: Trivia! assesses knowledge in Java, focusing on object-oriented programming, class and object distinctions, and visibility of class members. This quiz is ideal for learners aiming to test their understanding of Java's core concepts.
Is accessible publicly
Is only accessible by other classes of the same package
Is only accessible from within the class
Is accessible by the class and its subclasses
Rate this question:
An objects exists in memory in run time
A class needs to be instantiated as an object before being used
An object is a variable, where its type is the class used to declare the variable
Class and object are just different names for the same thing
Rate this question:
Description
Methods
Associations with other objects
Name
Rate this question:
B is a sub-class of A
A is a super-class of B
B has access to private members of A
B has access to protected members of A
An attribute
A method
Attribute or method
A sub-class
Rate this question:
Class B inherits from Class A
Class B is defined within class A
Class B has an attribute of type A
Class A has an attribute of type B
Rate this question:
Implemented as a Java attribute member
Implemented as a Java method
Implemented as a sub-class
Implemented as a String constructor returning the name of the association target
Rate this question:
Anything
An algorithm
A data container
A program
Rate this question:
An object
An executable piece of code
An abstract definition of an object
A varibale
Rate this question:
The method setSize()
Automtically in run-time
The width and height attributes of the class JFrame
WIDTH and HEIGHT properties of the window menu in Eclipse
Rate this question:
Javax.swing
Javax.gui
Java.awt
Java.swing
Rate this question:
A Java Application
A Java Stand-Alone Application
A Java Applet
A Java Class
Rate this question:
Graphical User Interface
Gimme Ur Internet
Grand User Interface
Graphical Useful Interface
Rate this question:
Automatically
By inheriting from the main container such as a JFrame or JApplet
By calling the method setLayout
By calling the method setContentPane
Rate this question:
Add(this.mainPanel);
This.add(mainPanel);
MainPanel.setVisible(true);
GetContentPane().add(mainPanel);
Rate this question:
JApplet
JFrame
JPanel
JButton
Rate this question:
JButton aButton('test');
JButton aButton=new JButton("test");
JButton aButton=new JButton('test');
JButton("test") aButton;
Rate this question:
Add(mainPanel);
This.add(mainPanel);
MainPanel.setVisible(true);
GetContentPane().add(mainPanel);
Rate this question:
The method setSize()
Automtically in browser
The width and height attributes of the class JApplet
HTML properties WIDTH and HEIGHT of the APPLET tag.
Rate this question:
0
1
Ar.length
Ar.length - 1
Rate this question:
6
2 + 4
1 + 3
4
Rate this question:
For (int i =0; i < 3; i++) System.out.println( nums[i]);
For (i = 1; i
For (i = 0; i
For (i = 1; i < 3; i++) System.out.println(nums[i]);
Rate this question:
Ab
Ac
Ace
Bd
Rate this question:
2
3
4
5
Rate this question:
System.out.print("The number is : " + nums[0]);
System.out.print("The number is : " + nums[1]);
System.out.print("The number is : " + nums[8]);
Rate this question:
Similar values of same data type
Different values of same data type
Same values of different data types
Different values of different data types
Rate this question:
Whatever programmer specifies
1
0
Size of array
Rate this question:
Perform for loop on array
Perform different operations on each element in array
Perform the same operation on all elements in array
Rate this question:
0
6
5
7
Rate this question:
Class Circle extends Cylinder
Class Cylinder derived Circle
Class Cylinder extends Circle
Class Circle derived Cylinder
Rate this question:
ATM version number
The relationship from ATM to ATM Display
The relationship from ATM to Account
The account number
Rate this question:
Public or private superclass member
Private superclass member
Public superclass member (and protected subclass members if it's in the same package)
Protected, public or private superclass member
Rate this question:
Public or private superclass member
Private superclass member
Public superclass member (and protected subclass members if it's in the same package)
Protected, public or private superclass member
Rate this question:
Faculty[] faculties={new Person(), new Staff(), new Student()};
Staff[] staff={new Person(), new Faculty(), new Student()};
Student[] students={new Person(), new Staff(), new Faculty()};
Person[] persons={new Faculty(), new Staff(), new Student()};
Rate this question:
Quiz Review Timeline (Updated): Mar 20, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.