DIFFERENCE BETWEEN ABSTRACT CLASSES AND INTERFACES

Royce Roy

Total Post:149

Points:1043
Posted by  Royce Roy
 908  View(s)
Ratings:
Rate this:
Difference between  Abstract classes and Interfaces in Java


  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: Difference between Abstract classes and Interfaces

    Abstract classes

    1)An abstract class can have method body (non-abstract methods).
    2)An abstract class can have instance variables.
    3)An abstract class can have constructor.
    4)An abstract class can have static methods.
    5)You can extends one abstract class

    Interfaces
    Interface have only abstract methods.
    An interface cannot have instance variables.
    Interface cannot have constructor.
    Interface cannot have static methods.
    You can implement multiple interfaces.

    .

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!