Seach

interface in java a simple example

interface i
{
public void show();
}
public class x implements i
{
public void show()
{
System.out.println("Interface method has been overrided");
}
public static void main(String[] s)
{
x obj=new x();
obj.show();
}
}

No comments: