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
(78)
Correct Answer:
Verified

C

To get the name of a calling enum constant

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

D

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

Free
(Multiple Choice)
4.7/5
(66)
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
(78)

When you write an enumerated type declaration, you

(Multiple Choice)
4.8/5
(75)

CRC stands for

(Multiple Choice)
4.9/5
(81)

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

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

(Multiple Choice)
4.9/5
(73)

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

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

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

(True/False)
4.9/5
(83)

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

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

(Multiple Choice)
4.9/5
(73)

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

(Multiple Choice)
5.0/5
(74)

A static field is created by placing the key word static

(Multiple Choice)
4.8/5
(75)

When the this variable is used to call a constructor

(Multiple Choice)
4.8/5
(77)

When a field is declared static there will be

(Multiple Choice)
4.8/5
(90)

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

(Multiple Choice)
5.0/5
(80)

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

(True/False)
4.8/5
(81)

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
(74)
Showing 1 - 20 of 40
close modal

Filters

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