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
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
(36)
When an object is passed as an argument, it is actually a reference to the object that is passed.
(True/False)
4.9/5
(44)
The key word this is the name of a reference variable that an object can use to refer to itself.
(True/False)
4.9/5
(35)
You cannot use the fully-qualified name of an enum constant for this.
(Multiple Choice)
4.8/5
(36)
The term for the relationship created by object aggregation is:
(Multiple Choice)
4.8/5
(41)
If the following is from the method section of a UML diagram, which of the following statements is TRUE?
+ add(object2:Stock): Stock
(Multiple Choice)
4.9/5
(43)
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
(33)
If the following is from the method section of a UML diagram, which of the following statements is TRUE?
+ equals(object2:Stock) : boolean
(Multiple Choice)
4.7/5
(34)
If you attempt to perform an operation with a null reference variable:
(Multiple Choice)
4.7/5
(32)
When an object reference is passed to a method, the method may change the values in the object.
(True/False)
4.8/5
(46)
Assuming 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
(37)
What will be returned from a method, if the following is the method header?
Public Rectangle getRectangle()
(Multiple Choice)
4.8/5
(39)
If a class has a method named finalize, it is called automatically just before a data member that has been identified as final of the class is destroyed by the garbage collector.
(True/False)
4.9/5
(41)
The this key word is the name of a reference variable that is available to all static methods.
(True/False)
4.9/5
(35)
Assume the class BankAccount has been created, and the following statement correctly creates an instance of the class: BankAccount account = new BankAccount(5000.0);
What is TRUE about the following statement?
System.out.println(account);
(Multiple Choice)
4.8/5
(34)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)