WHAT ARE INTERFACES IN JAVA

Samuel Fernandes

Total Post:38

Points:190
Posted by  Samuel Fernandes
 651  View(s)
Ratings:
Rate this:
  1. Samuel Fernandes

    Post:38

    Points:190
    What are interfaces in Java

    What are interfaces in Java ?

  1. Mayank Tripathi

    Post:807

    Points:4035
    What are interfaces in Java

    An interface in java is a blueprint of a class. It has static constants and abstract methods only.

    The interface in java is a mechanism to achieve fully abstraction. There can be only abstract methods in the java interface not method body. It is used to achieve fully abstraction and multiple inheritance in Java.

    Java Interface also represents IS-A relationship.It cannot be instantiated just like abstract class. 
    A class can only implement interfaces

    Uses:
    It is used to achieve fully abstraction.
    By interface, we can support the functionality of multiple inheritance.
    It can be used to achieve loose coupling.

Answer

NEWSLETTER

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