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 Interface)---------------------

//Interface Example

interface InterfaceDemo

{

public void show();

public int display();

}

class A implements InterfaceDemo

{

public void message(int num)

{

System.out.println("Message method..."+num);

}

public void show()

{

System.out.println("show method...");

}

public int display()

{

System.out.println("display method...");

return(0);

}

}

class InrterfaceExample

{

public static void main(String jj[])

{

A a=new A();

a.message(5);

a.show();

a.display();

}

}
Output:-



No comments: