1interface methods{
2 public void hey();
3 public void bye();
4}
5
6//unable to implement all the abstract methods in the interface so
7// the other class automatically becomes abstract
8abstract class other implements methods{
9 public void hey(){
10 System.out.println("Hey");
11 }
12}
13
14//able to implement all the methods so is not abstract
15class scratch implements methods {
16 public void hey(){
17 System.out.println("Hey");
18 }
19 public void bye() {
20 System.out.println("Hey");
21 }
22}
1abstract class have no implementation of methods functions inside it. the classes which extending abstract class have to implement it
2
1abstract classes have no implementation of functions methods inside it which declared as abstract methods. classes which are inheriting it have to overriden it. and final absract class can not be overriden
2