A process in which a method calls itself continuously! :0
returnt_ype methodName( ){ Â
//code not shown
methodName(); //calling same method } Â
** this is an optional section. In my point of view, everyone has their own thinking and you can make your own algorithm with this concepts.
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!!