S
Sameer
Consider the declaration from Java API:
public abstract class Toolkit extends Object
This abstract class java.awt.Toolkit contains one abstract method beep.
public abstract void beep()
The Java Tutorial says that-
"An abstract class can contain abstract methods - methods with no
implementation. In this way, an abstract class can define a complete
programming interface for its subclasses but allows its subclasses to
fill in the implementation details of those methods."
But we can make instance of Toolkit and make use of this method.
Toolkit t= new Toolkit();
t.beep();
How can we make instance of this abstract class and make use of one of
its abstract method?
Who fill 'implementation details' for the beep method?
-Sameer
public abstract class Toolkit extends Object
This abstract class java.awt.Toolkit contains one abstract method beep.
public abstract void beep()
The Java Tutorial says that-
"An abstract class can contain abstract methods - methods with no
implementation. In this way, an abstract class can define a complete
programming interface for its subclasses but allows its subclasses to
fill in the implementation details of those methods."
But we can make instance of Toolkit and make use of this method.
Toolkit t= new Toolkit();
t.beep();
How can we make instance of this abstract class and make use of one of
its abstract method?
Who fill 'implementation details' for the beep method?
-Sameer