Exam 8: A Second Look at Classes and Objects

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

A single copy of a class's static field is shared by all instances of the class.

(True/False)
4.7/5
(34)

CRC stands for __________.

(Multiple Choice)
4.8/5
(44)

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)
5.0/5
(41)

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)

When an object is passed as an argument, it is actually a reference to the object that is passed.

(True/False)
4.9/5
(38)

You can declare an enumerated data type inside a method.

(True/False)
4.7/5
(35)

Which of the following is not true about static methods?

(Multiple Choice)
4.9/5
(39)

The key word this is the name of a reference variable that is available to all static methods.

(True/False)
4.7/5
(48)

When a field is declared static there will be __________.

(Multiple Choice)
4.7/5
(44)

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

(Multiple Choice)
4.8/5
(29)

If you have defined a class, 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)
5.0/5
(35)

Static methods can only operate on __________ fields.

(Multiple Choice)
4.7/5
(42)
Showing 41 - 52 of 52
close modal

Filters

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