• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
June 08, 2022 |1.6K Views

Interfaces (Java Programming)

  Share   Like
Description
Discussion

An Interface in Java programming language is defined as an abstract type used to specify the behavior of a class. An interface in Java is a blueprint of a class. A Java interface contains static constants and abstract methods.

The interface in Java is a mechanism to achieve abstraction. There can be only abstract methods in the Java interface, not the method body. It is used to achieve abstraction and multiple inheritance in Java. In other words, you can say that interfaces can have abstract methods and variables. It cannot have a method body. Java Interface also represents the IS-A relationship.

Interfaces (Java Programming): https://www.geeksforgeeks.org/interfaces-in-java/