In Java:
- Abstract classes have one or more abstract method.
- Cannot be instantiated, but can:
- Have a constructor (callable from subclasses using
super()).- Be referenced (
Figure f = new Rectangle()).- Subclasses of abstract classes (
Rectangle extends Figure) must implement the abstract methods or must themselves be abstract.Read the tutorial: http://www.java-samples.com/showtutorial.php?tutorialid=288
No comments:
Post a Comment