1.3K
Interface are used as “superclasses” whose properties are inherited by classes. It is necessary to create a class that inherits the given interface.
Let have a look ,how can be this done
interface HelloWorld{
void print();
}
class A implements HelloWorld{
public void print()
{
System.out.println("Techarge");
}
public static void main(String args[]){
A obj = new A();
obj.print();
}
}