Exam 8: A Second Look at Classes and Objects

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following is NOT true about static methods?

(Multiple Choice)
4.8/5
(39)

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.8/5
(39)

If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsAccount object referenced by the variable account20, which of the following will assign numberOfAccounts to numAccounts?

(Multiple Choice)
4.8/5
(36)

The names of the enum constants in an enumerated data type must be enclosed in quotation marks.

(True/False)
4.9/5
(40)

To compare two objects in a class:

(Multiple Choice)
4.9/5
(43)

If object1 and object2 are objects of the same class, to make object2 a copy of object1:

(Multiple Choice)
4.9/5
(37)

The whole-part relationship created by object aggregation is more often called:

(Multiple Choice)
4.7/5
(28)

An object's ________ is simply the data that is stored in the object's fields at any given moment.

(Multiple Choice)
4.8/5
(40)

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.8/5
(28)

When a method's return type is a class, what is actually returned to the calling program?

(Multiple Choice)
4.8/5
(40)
Showing 41 - 50 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)