what is main purpose of interface?
Answers were Sorted based on User's Feedback
Answer / saikatk
There is no multiple inheritance in java,we can't extends
more than one class at a time,so interface is a way to
implement multiple inheritance in java, and from design
point view when we have some class specific behaviours we
can put interface as a base of the classes.
| Is This Answer Correct ? | 44 Yes | 4 No |
Answer / javachi
The purpose of interface is to create the relationship between the parties involved. parties is nothing but a set of classes relates with each other. this is required when the sub class inherits the property of two or more superclasses(multiple inheritance)
| Is This Answer Correct ? | 7 Yes | 8 No |
what ide u r using and wat version, how wil u build the project etc ?
How to sort numbers in java without array?
What do you understand by the term polymorphism?
Why main() method is public, static and void in java ?
What does java se mean?
What is stringwriter?
How do you write methodology?
Can inner class be public in java?
What is the maximum length of a url?
Can we create object of inner class in java?
What is difference between jdk,jre and jvm?
What are wrapper classes?