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 |
How do you start a new line in java?
What is a instance variable in java?
How java uses the string and stringbuffer classes?
Explain access modifiers in java.
What is google full form?
Why is java called the platform independent programming language?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
where do you place after you did code in java
What is the purpose of default constructor?
Why string is immutable with example?
What is thread start?
Can arraylist contain null values?