Eclipse IDE implement interface in java
Example program in java interface using eclipse IDE
package javaproject1;
interface Interface1
{
void show1();
}
interface Interface2
{
void show2();
}
class InterfaceDefintion implements Interface1,Interface2
{
public void show1()
{
System.out.println("Here give the definition of show1 method.....");
}
public void show2()
{
System.out.println("Here give the definition of show2 method.....");
}
}
class IntrefaceDemo
{
public static void main(String a[])
{
InterfaceDefintion obj=new InterfaceDefintion();
obj.show1();
obj.show2();
}
}
short explanation of interface
Comments
Post a Comment