Exam 8: A Second Look at Classes and Objects
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
In Java it is possible to write a method that will return __________.
Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
D
If the this variable is used to call a constructor, __________.
Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
A
When you make a copy of the aggregate object and of the objects that it references, __________.
(Multiple Choice)
4.8/5
(35)
The names of the enum constants in an enumerated data type must be enclosed in quotation marks.
(True/False)
4.9/5
(36)
If the following is from the method section of a UML diagram, which of the statements below is true?
+ equals(object2:Stock) : boolean
(Multiple Choice)
4.9/5
(33)
An instance of a class does not have to exist in order for values to be stored in a class's static fields.
(True/False)
4.8/5
(29)
When a reference variable is passed as an argument to a method __________.
(Multiple Choice)
4.8/5
(41)
__________ is the term for the relationship created by object aggregation.
(Multiple Choice)
4.8/5
(37)
Assume the class BankAccount has been created and the following statement correctly creates an instance of the class. BankAccount account = new BankAccount(5000.00);
What is true about the following statement?
System.out.println(account);
(Multiple Choice)
4.7/5
(33)
If object1 and object2 are objects of the same class, to make object2 a copy of object1 __________.
(Multiple Choice)
4.9/5
(29)
Both instance fields and instance methods are associated with a specific instance of a class, and they cannot be used until an instance of the class is created.
(True/False)
4.7/5
(34)
If you write a toString method for a class, Java will automatically call the method any time you concatenate an object of the class with a string.
(True/False)
4.9/5
(41)
The key word this is the name of a reference variable that an object can use to refer to itself.
(True/False)
4.8/5
(38)
The whole-part relationship created by object aggregation is more often called a(n) __________ relationship.
(Multiple Choice)
4.8/5
(43)
The only limitation that static methods have is __________.
(Multiple Choice)
4.9/5
(35)
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
(28)
A class's static methods do not operate on the fields that belong to any instance of the class.
(True/False)
4.8/5
(31)
The JVM periodically performs the __________ process to remove unreferenced objects from memory.
(Multiple Choice)
4.8/5
(44)
Showing 1 - 20 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)