What is interface in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

What is interface in java?

java

9th Nov 2017, 11:56 AM
Md Tarique Aziz
1 Answer
+ 2
An interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface. Along with abstract methods, an interface may also contain constants, default methods, static methods, and nested types.
9th Nov 2017, 12:03 PM
Shubham Sharma
Shubham Sharma - avatar