What is the use of an interface ?

What is the use of an interface ?

An interface tells that what a class can do. It is a good 
object oriented design to use interfaces in your program. 
When a class implements the interface, it is actually 
contracting to implement all the functionality of the interface. 
Interfaces also support multiple inheritance.

By:Jalees
Date:2012-01-09 00:00:00

An interface tells that what a class can do. It is a good 
object oriented design to use interfaces in your program. 
When a class implements the interface, it is actually 
contracting to implement all the functionality of the interface. 
Interfaces also support multiple inheritance.

By:Sumit Tripathi
Date:2019-05-15 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher