Another way to achieve abstraction in Java!
Human language: It is used to restrict your code to the following rules in that abstraction class.
interface Animal {
public void run( );
}
public Dog implements Animal {
public void run( ){
// code not shown
}
}
** When a class implements it, it must have everything method that an interface contains. Remember that a class can implement many interfaces!!