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 are actual parameters?
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
When do we use synchronized methods in java?
Explain notify() method of object class ?
What are green threads in java?
hi to all. well can you please tell me that why String class is immutable? Thanks in advance.
waht happens when a return type ,even void is specified for a constructor?
What is the buffer limit?
What is class forname used for?
How do you define a parameter?
How does access modifiers work?
What are field variable and local variable?