Exam 11: Advanced Inheritance Concepts

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

Match each term with the correct statement below. -A class-naming conflict

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

B

A good toString() method can be very useful in debugging a program.

Free
(True/False)
4.9/5
(35)
Correct Answer:
Verified

True

Match each term with the correct statement below. -Contains the Object class

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

G

Abstract classes and interfaces are similar in that you cannot instantiate concrete objects from either one.

(True/False)
4.8/5
(31)

What are the three ways in which you can compare abstract classes and interfaces?

(Essay)
4.9/5
(36)

What are the advantages to creating a useful, extendable superclass?

(Essay)
4.8/5
(43)

What is the toString() method used for and how is it used?

(Essay)
4.9/5
(36)

Instead of using the automatic toString() method with your classes, it is usually more useful to write your own ____ version of the toString() method that displays some or all of the data field values for the object with which you use it.

(Multiple Choice)
4.8/5
(26)

Abstract classes and methods appear in ____ in a class diagram.

(Multiple Choice)
4.7/5
(38)

When you define a class, if you do not explicitly extend another class, your class is an extension of the ____ class.

(Multiple Choice)
4.9/5
(47)

The ___ method is useful in debugging a program because it can be used to display and examine values.

(Multiple Choice)
4.8/5
(31)

Which of the following statements creates an array of three Animal references?

(Multiple Choice)
4.9/5
(39)

If Java did not allow you to ____ classes, you would need to create every part of a program from scratch.

(Multiple Choice)
4.9/5
(34)

You sometimes create an abstract class only so you can ____ it to another class.

(Multiple Choice)
4.8/5
(36)

The Object class contains a(n) ____________________ method that takes a single argument, which must be the same type as the type of the invoking object.

(Short Answer)
4.8/5
(33)

When a superclass is abstract, you cannot instantiate objects of a superclass. How can you use a superclass abstract object?

(Essay)
4.9/5
(47)

The java.lang package contains the Object class and is imported automatically each time a program is written.

(True/False)
4.8/5
(30)

Match each term with the correct statement below. -Prohibited in Java

(Multiple Choice)
4.9/5
(31)

Java's Object class contains a public method named ____ that returns an integer representing the hash code.

(Multiple Choice)
4.9/5
(41)

When you create classes for others to use, why would you not want to provide the users with your source code in the files with .java extensions?

(Essay)
4.9/5
(38)
Showing 1 - 20 of 70
close modal

Filters

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