Basic HTML version of Foils prepared Sept 6 1998

Foil 33 Abstract Methods and Classes

From Java Tutorial 98-2: Java Language and Object Oriented Techniques CPS606 Fall Semester 1999 -- Sept 7 1999. by Geoffrey C. Fox, Nancy McCracken


An abstract method has no body - it is provided in a class to define the signature of the method for program structuring purposes. It must be defined in some subclass of the class in which it is declared.
  • Constructors, static methods, private methods cannot be abstract
  • A method that overrides a superclass method cannot be abstract
Classes that contain abstract methods and classes that inherit abstract methods without overriding them are considered abstract classes
  • It is compile-time error to instantiate an abstract class or attempt to call an abstract method directly.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Sep 6 1999