Exam 8: A Second Look at Classes and Objects

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

A deep copy of an object __________.

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

B

In Java it is possible to write a method that will return __________.

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

D

If the this variable is used to call a constructor, __________.

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

A

When you make a copy of the aggregate object and of the objects that it references, __________.

(Multiple Choice)
4.8/5
(35)

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

(True/False)
4.9/5
(36)

If the following is from the method section of a UML diagram, which of the statements below is true? + equals(object2:Stock) : boolean

(Multiple Choice)
4.9/5
(33)

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

When a reference variable is passed as an argument to a method __________.

(Multiple Choice)
4.8/5
(41)

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

(Multiple Choice)
4.8/5
(37)

Assume the class BankAccount has been created and the following statement correctly creates an instance of the class. BankAccount account = new BankAccount(5000.00); What is true about the following statement? System.out.println(account);

(Multiple Choice)
4.7/5
(33)

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

(Multiple Choice)
4.9/5
(29)

To compare two objects in a class, __________.

(Multiple Choice)
4.9/5
(38)

Both instance fields and instance methods are associated with a specific instance of a class, and they cannot be used until an instance of the class is created.

(True/False)
4.7/5
(34)

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

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

(True/False)
4.8/5
(38)

The whole-part relationship created by object aggregation is more often called a(n) __________ relationship.

(Multiple Choice)
4.8/5
(43)

The only limitation that static methods have is __________.

(Multiple Choice)
4.9/5
(35)

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

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

(True/False)
4.8/5
(31)

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

(Multiple Choice)
4.8/5
(44)
Showing 1 - 20 of 52
close modal

Filters

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