Monday, January 23, 2012

abstract applicable for what

/*
RULE: abstract key word only applicable for CLASSES and METHODS not for variables
*/
public abstract class AbstractDemo
{
abstract int x;                             // illegal
abstract public void method1();
abstract public int method2();
}