Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Java (http://siteownersforums.com/forumdisplay.php?f=12)
-   -   What is difference between abstract class and interface? (http://siteownersforums.com/showthread.php?t=348757)

Pavan Techn 05-29-2018 08:37 AM

What is difference between abstract class and interface?
 
Abstract class Interface
1)An abstract class can have method body (non-abstract methods). Interface have only abstract methods.
2)An abstract class can have instance variables. An interface cannot have instance variables.
3)An abstract class can have constructor. Interface cannot have constructor.
4)An abstract class can have static methods. Interface cannot have static methods.
5)You can extends one abstract class. You can implement multiple interfaces.


All times are GMT -7. The time now is 12:42 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.