❮ Previous Next ❯

Difference between Interface and Abstract class

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.
❮ Previous Next ❯


  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved