Computer Science, asked by TalliRavi524, 1 year ago

difference between abstract class and interface in java

Answers

Answered by crazzyygal
1
ABSTRACT CLASS:
1- THE ABSTRACT KEYWORD IS USED TO PRESENT ABSTRACT CLASS.

2- IT CAN HAVE FINAL, NON-FINAL,STATIC AND NON-STATIC VARIABLES.

3-IT CAN PROVIDE IMPLEMENTATION OF INTERFACE AND IT CAN HAVE ABSTRACT AND NON-ABSTRACT METHODS.

INTERFACE :

1- THE INTERFAE KEYWORD IS USED TO PRESENT INTERFACE.

2- IT HAS ONLY STATIC AND FINAL VARIABLES.

3- IT CAN NOT PROVIDE IMPLEMENTATION OF ABSTRACT CLASS AND IT HAS ONLY ABSTRACT METHODS.

Similar questions