Basic HTML version of Foils prepared Sept 21 1998

Foil 33 Abstract Methods and Classes

From Java Tutorial 98- 2: Java Language and Object Oriented Techniques NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken


1 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
2 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.

in Table To:


© 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 Sat Nov 28 1998