Friday, June 30, 2006

[java] shows extending a class

shows extending a class

class xyz

{

int a =9;

void pqr()

{

System.out.println("Hello");

}

}

class lmn extends xyz

{

int g= 100;

void add()

{

System.out.println(a+g);

pqr();

}

public static void main(String args[])

{

lmn obj = new lmn();

obj.add();

}

}

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

No comments: