Friday, June 30, 2006

[java] Shows abstract and interface classes

Shows abstract and interface classes

abstract class abc

{

abstract void pqr();

}

interface lmn

{

void cdf();

}

class der extends abc implements lmn

{

void pqr()

{

System.out.println("Hello");

}

public void cdf()

{

System.out.println("Hello World");

}

public static void main(String args[])

{

der obj = new der();

obj.pqr();

obj.cdf();

}

}

Pradyut
http://pradyut.tk
http://spaces.msn.com/members/oop-edge/
http://groups-beta.google.com/group/oop_programming
India

No comments: