Exam 9: Advanced Java Topics

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

What are the two basic kinds of relationships among classes?

Free
(Essay)
5.0/5
(34)
Correct Answer:
Verified

The two kinds of relationships are: is-a relationship and has-a relationship.

______ enables the reuse of existing classes.

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

B

A subclass inherits all of the following members of its superclass EXCEPT ______.

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

C

A Java ______ specifies behaviors that are common to a group of classes.

(Multiple Choice)
4.8/5
(40)

If a method definition in a superclass has the field modifier ______,a subclass is required to override the method.

(Multiple Choice)
4.8/5
(37)

What is meant by object type compatibility?

(Essay)
4.9/5
(30)

Inheritance should only be used when a(n)______ relationship exists between the superclass and the subclass.

(Multiple Choice)
4.8/5
(38)

A package cannot contain other packages.

(True/False)
4.8/5
(31)

A superclass method can be accessed by a subclass,even though it has been overridden by the subclass,by using the ______ reference.

(Multiple Choice)
4.9/5
(37)

What is method overloading?

(Essay)
4.8/5
(33)

Name two things that an abstract class may include that an interface would not.

(Essay)
4.9/5
(37)

The keyword ______ is used in the class declaration of a subclass to indicate its superclass.

(Multiple Choice)
4.9/5
(30)

A class's ______ members are available to instances of all classes.

(Multiple Choice)
4.8/5
(34)

What is meant by dynamic binding?

(Essay)
4.8/5
(36)

What is a subinterface?

(Essay)
4.8/5
(37)

The constructor of a subclass can call the constructor of the superclass by using the ______ reference.

(Multiple Choice)
4.9/5
(39)

What is an advantage to defining an ADT that uses a generic data type?

(Essay)
4.9/5
(29)

A method that has the same name but a different set of parameters as an existing method is said to ______ the original method.

(Multiple Choice)
4.7/5
(36)

An instance of a superclass can be used anywhere an instance of its subclass is expected.

(True/False)
4.8/5
(34)

______ is the ability of a class to derive properties from a previously defined class.

(Multiple Choice)
4.9/5
(38)
Showing 1 - 20 of 60
close modal

Filters

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