Interface | Abstract Class |
---|---|
Inside interface every method is public and abstract, whether we are declaring or not, hence interface is considered as 100% pure abstract class. | Every method present in abstract class need not be public and abstract. In addition to abstract methods we can take concrete methods. |
We can't declare interface method with the private, protected, final, static, synchronized, native. | variable present inside the abstract class not be public, static and final. |
Every variable inside the interface always public, static and final whether we are declaring or not. | variable present inside the abstract class not be public, static and final. |
We can't declare interface variable with the private, protected, transient and volatile. | There are no restrictions on abstract class variable modifiers. |
Inside the interface, we can't declare instance and static blocks, otherwise we will get the compilation error. | Inside abstract class we can declare instance and static blocks. |
Inside the interface we can't declare constructor. | Inside abstract class we can declare constructor which will be executed at the time of execution. |
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc