Exam 6: A Second Look at Classes and Objects
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
A class that is defined inside another class is called a(n)
Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
C
To get the name of a calling enum constant
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
D
The JVM periodically performs the __________ process to remove unreferenced objects from memory.
Free
(Multiple Choice)
4.7/5
(29)
Correct Answer:
C
A class's static methods do not operate on the fields that belong to any instance of the class.
(True/False)
4.8/5
(32)
Assume the following declaration exists: enum Tree ( OAK, MAPLE, PINE )
What will the following code display?
System.out.println(Tree.OAK);
(Multiple Choice)
4.8/5
(35)
By default, a reference variable that is an instance field is initialized to the value
(Multiple Choice)
4.9/5
(36)
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)
4.8/5
(40)
The key word this is the name of a reference variable that an object can use to refer to itself.
(True/False)
4.7/5
(41)
When an object is passed as an argument, it is actually a reference to the object that is passed.
(True/False)
4.9/5
(41)
Given the following declaration: enum Tree ( OAK, MAPLE, PINE )
What is the fully-qualified name of the PINE enum constant?
(Multiple Choice)
4.7/5
(42)
A declaration for an enumerated type begins with the __________ key word.
(Multiple Choice)
4.9/5
(30)
__________ is the term for the relationship created by object aggregation.
(Multiple Choice)
4.9/5
(28)
Which of the following can you use to compare two enum data values?
(Multiple Choice)
4.9/5
(41)
If a class has a method named finalize, it is called automatically just before an instance of the class is destroyed by the garbage collector.
(True/False)
4.9/5
(38)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)