what is main purpose of interface?
Answer Posted / 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 |
Post New Answer View All Answers
What is regex in java?
If try block is successfully executed, Then Is Finally block executed?
Can we synchronize static methods in java?
Is array primitive data type in java?
Explain about core java?
What is a parameter used for?
What does flagged out mean?
Why a dead thread occurs?
Difference between serialization and deserialization in java?
What is size_t?
Explain abstract class in java?
What sorting algorithm does javascript use?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What is dot operator?
What are the different approaches to implement a function to generate a random number?