This is the one way of initializing
interface Interface
{
public void showSomeThing();
}
class InterfaceImpl implements Interface
{
public void showSomeThing()
{
System.out.println("Interface Demo");
}
public static void main(
String[] args)
{
Interface obj = new InterfaceImpl();
obj.showSomeThing();
}
}