extends:-
in java extends keyword is used for inheritence from only one class
example
public class demo extends Frame \\\legal declaration
{ ......... }
public class demo extends Frame, Applet \\\illegal declaration
{ ......... }
implementation Keyword: -
The implements keyword is used for multiple inheritence in java, but
you can only implement only interface (which same as like abstract
classes in C++ but only difference is here that no methods should have
body in interface.
example:
inteface demoInterface1
{
public void demoMethod(int demoVar);
}
inteface demoInterface2
{
public void demoMethod(int demoVar);
}
public class demo extends Frame implements demoInterface1,
demoInterface2
{.................................}
Here you are extending Frame class and implementing multiple interface
demoInteface1, demoInteface2 but the methods body of the the interface
methods will be written in class where the inteface has been
implemented.