Exam 13: Interfaces and Inner Classes

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

An interface can contain defined constants as well as method headings or instead of method headings.

Free
(True/False)
4.7/5
(42)
Correct Answer:
Verified

True

Inner classes available outside the scope of their outer class are modified by the keyword:

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

A

A class may only implement one interface.

Free
(True/False)
4.8/5
(38)
Correct Answer:
Verified

False

The Comparable interface is in the ______________ package.

(Multiple Choice)
4.9/5
(38)

If an inner class contains non static members,then the class name must be modified by the keyword:

(Multiple Choice)
4.7/5
(29)

The compiler and the run-time system enforces semantics on the Comparable interface.

(True/False)
4.9/5
(39)

An inner class definition is local to the outer class definition.

(True/False)
4.8/5
(36)

An interface may contain:

(Multiple Choice)
4.8/5
(40)

A class that uses an interface must use the keyword:

(Multiple Choice)
4.8/5
(26)

A class that implements an interface but only gives definitions for some of the method headings given in the interface is called a/an:

(Multiple Choice)
4.9/5
(32)

The compareTo method should return _____________ if the calling object equals the parameter.

(Multiple Choice)
4.9/5
(38)

Java interfaces are a way of simulating multiple inheritance.

(True/False)
4.8/5
(38)

A common use of inner classes is :

(Multiple Choice)
4.7/5
(53)

In Java,a derived class can have ________ base classes).

(Multiple Choice)
5.0/5
(43)

What are the semantics of the Comparable interface?

(Essay)
4.9/5
(44)

A Java interface is an example of:

(Multiple Choice)
4.8/5
(33)

Why does Java only allow the inheritance of only one base class?

(Essay)
4.9/5
(34)

When using the clone method from an inherited base class you should account for a _________ exception.

(Multiple Choice)
4.9/5
(31)

Any constant variables defined in an interface must be defined as:

(Multiple Choice)
4.8/5
(40)

What are the rules of total ordering?

(Essay)
4.9/5
(36)
Showing 1 - 20 of 32
close modal

Filters

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