The abstract modifier can be applied to classes and methods. : abstract « Modifiers « SCJP






public abstract class MainClass{

   public abstract void myMethod();
}








3.7.abstract
3.7.1.Abstract class or method
3.7.2.The abstract modifier can be applied to classes and methods.
3.7.3.If a class contains one or more abstract methods, the compiler insists that the class must be declared abstract.
3.7.4.A class that is abstract may not be instantiated
3.7.5.Abstract classes provide a way to defer implementation to subclasses.
3.7.6.Subclass of an abstract class must provide an implementation of the abstract method or declare itself to be abstract.
3.7.7.A class must be declared abstract if it implements an interface but it does not provide implementations for every method.
3.7.8.Interfaces are always abstract, but the keyword is optional in the declaration.
3.7.9.Variables can't be declared abstract.
3.7.10.You can have an abstract class with no abstract methods.