About Me

My photo
Raipur, Chhattisgarh, India
Hi , I am Amit Thakur. I have worked as a QA Engineer for two years and as a Java Developer for one year in NIHILENT TECHNOLOGIES PVT. LTD., Pune.Currently I am working as DEAN (Research & Development) in Bhilai Institute of Technology, Raipur.

Monday, April 26, 2010

JAVA(Demo Of Final class, Method and variable)

//Demo of final class and Methods and Variables

final class A

{

final public void show()

{

final int num=100;

System.out.println("This is Show method of class A...");

num=50;

}

}

class B extends A

{

int num=200;

public void show()

{

System.out.println("This is Show method of class B...");

}

}

class FinalDemo

{

public static void main(String ll[])

{

B b=new B();

b.show();

}

}

Output:-

No comments: