Exam 6: A Second Look at Classes and Objects

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

A class that is defined inside another class is called a(n)

Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
Verified

C

To get the name of a calling enum constant

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

D

The JVM periodically performs the __________ process to remove unreferenced objects from memory.

Free
(Multiple Choice)
4.7/5
(29)
Correct Answer:
Verified

C

A class's static methods do not operate on the fields that belong to any instance of the class.

(True/False)
4.8/5
(32)

When you write an enumerated type declaration, you

(Multiple Choice)
4.8/5
(37)

CRC stands for

(Multiple Choice)
4.9/5
(44)

Assume 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
(35)

By default, a reference variable that is an instance field is initialized to the value

(Multiple Choice)
4.9/5
(36)

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)

The key word this is the name of a reference variable that an object can use to refer to itself.

(True/False)
4.7/5
(41)

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

(True/False)
4.9/5
(41)

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
(42)

A declaration for an enumerated type begins with the __________ key word.

(Multiple Choice)
4.9/5
(30)

__________ is the term for the relationship created by object aggregation.

(Multiple Choice)
4.9/5
(28)

A static field is created by placing the key word static

(Multiple Choice)
4.8/5
(40)

When the this variable is used to call a constructor

(Multiple Choice)
4.9/5
(40)

When a field is declared static there will be

(Multiple Choice)
4.8/5
(41)

Which of the following can you use to compare two enum data values?

(Multiple Choice)
4.9/5
(41)

An enumerated data type is actually a special type of class.

(True/False)
4.8/5
(43)

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.9/5
(38)
Showing 1 - 20 of 40
close modal

Filters

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