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 5 boolean operators?
Is string a wrapper class?
Is an object null?
How do you compare two objects?
write a program that list all permutations of ABCDEF in which A appears before B?
What are data types in oop?
Explain serialization and deserialization in java?
What is the char data type?
State one difference between a template class and class template.
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
When do I need to use reflection feature in java?
Explain notify() method of object class ?