-
Book Overview & Buying
-
Table Of Contents
Java 9 with JShell
By :
A class can implement:
Only one interface.
One or more interfaces.
A maximum of two interfaces.
When a class implements an interface:
It can also inherit from a superclass.
It cannot inherit from a superclass.
It can inherit only from an abstract superclass but not from concrete superclasses.
An interface:
Can inherit from a superclass.
Cannot inherit from either a superclass or another interface.
Can inherit from another interface.
Which of the following lines declares a class named WonderDog that implements the Hideable interface:
public class WonderDog extends Hideable {
public class WonderDog implements Hideable {
public class WonderDog: Hideable {
An interface is:
A method.
A type.
An abstract class.