interface Demo2{
public static final int NUM=5;
public abstract void show1();
public abstract void show2();
}
class DemoImpl implements Demo2{
public void show1()
{}
public void show2()
{}
}
public class InterfaceDemo {
public static void main(String [] args){
DemoImpl d=new DemoImpl();
System.out.println(d.NUM);
System.out.println(Demo2.NUM);
System.out.println(DemoImpl.NUM);
}
}
|
|