Exam 8: A Second Look at Classes and Objects
Exam 1: Introduction to Computers and Java51 Questions
Exam 2: Java Fundamentals61 Questions
Exam 3: Decision Structures64 Questions
Exam 4: Loops and Files57 Questions
Exam 5: Methods60 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class64 Questions
Exam 8: A Second Look at Classes and Objects50 Questions
Exam 9: Text Processing and More About Wrapper Classes60 Questions
Exam 10: Inheritance70 Questions
Exam 11: Exceptions and Advanced File IO56 Questions
Exam 12: A First Look at GUI Applications60 Questions
Exam 13: Advanced GUI Applications58 Questions
Exam 14: Applets and More54 Questions
Exam 15: Creating GUI Applications With Javafx and Scene Builder40 Questions
Exam 16: Recursion42 Questions
Exam 17: Databases48 Questions
Select questions type
If you write a toString method to display the contents of an object, object1, for a class, Class1, then the following two statements are equivalent:
System.out.println(object1);
System.out.println(object1.toString());
Free
(True/False)
4.9/5
(42)
Correct Answer:
True
In Java, it is possible to write a method that will return:
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
E
Static methods can only operate on ________ fields.
Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
B
The JVM periodically performs this process to remove unreferenced objects from memory.
(Multiple Choice)
4.8/5
(37)
Java automatically stores this value in all uninitialized static member variables:
(Multiple Choice)
4.9/5
(36)
When a reference variable is passed as an argument to a method:
(Multiple Choice)
4.9/5
(32)
A single copy of a class's static field is shared by all instances of the class.
(True/False)
4.9/5
(34)
A declaration for an enumerated type begins with this key word.
(Multiple Choice)
4.9/5
(47)
A class's static methods do not operate on the fields that belong to any instance of the class.
(True/False)
4.9/5
(33)
If you have defined a class SavingsAccount with a public static method getNumberOfAccounts(), and created a SavingsAccount object referenced by the variable account20, which of the following will call the getNumberOfAccounts()method?
(Multiple Choice)
5.0/5
(40)
Enumerated types have this method, which returns the position of an enum constant in the declaration list.
(Multiple Choice)
4.8/5
(36)
Look at the following declaration: enum Tree { OAK, MAPLE, PINE }
What is the ordinal value of the MAPLE enum constant?
(Multiple Choice)
4.9/5
(39)
Look at the following declaration: enum Tree { OAK, MAPLE, PINE }
What is the fully-qualified name of the PINE enum constant?
(Multiple Choice)
4.9/5
(38)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)