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 Structures40 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 I/O40 Questions
Exam 11: GUI Applications–Part 140 Questions
Exam 12: GUI Applications–Part 240 Questions
Exam 13: Applets and More40 Questions
Exam 14: Creating GUI Applications with JavaFX40 Questions
Exam 15: Recursion20 Questions
Exam 16: Databases40 Questions
Select questions type
Of the following, which would be considered the no-arg constructor for the Rectangle class?
Free
(Multiple Choice)
4.7/5
(44)
Correct Answer:
C
When you make a copy of the aggregate object and of the objects it references,
Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
C
A class that is defined inside of another class is called a(n)
(Multiple Choice)
4.8/5
(40)
When a method's return type is an object, what is actually returned to the calling program?
(Multiple Choice)
4.8/5
(40)
When an object is passed as an argument, it is actually a reference to the object that is passed.
(True/False)
4.8/5
(28)
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.9/5
(37)
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
(35)
Enumerated types have this method, which returns the position of an enum constant in the declaration list.
(Multiple Choice)
4.9/5
(44)
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
(33)
When a method in the ________ class returns a reference to a field object, it should return a reference to a copy of the field object to prevent "security holes."
(Multiple Choice)
4.7/5
(38)
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
(44)
If object1 and object2 are objects of the same class, to make object2 a copy of object1
(Multiple Choice)
4.9/5
(37)
________ is the term for the relationship created by object aggregation.
(Multiple Choice)
4.9/5
(48)
The "has a" relationship is sometimes called a(n) ________ because one object is part of a greater whole.
(Multiple Choice)
4.7/5
(38)
What will be returned from the method, if the following is the method header?
Public Rectangle getRectangle()
(Multiple Choice)
4.9/5
(41)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)