how to implement an interface in a class java code example
Example: interface in java
/* File name : Animal.java */
interface Animal {
public void eat();
public void travel();
}
/* File name : Animal.java */
interface Animal {
public void eat();
public void travel();
}