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 |
Can an exception be rethrown?
Which is a valid identifier?
Difference between object and reference?
what are the disadvantages of indexes in oracle?
0 Answers 3i Infotech, Wells Fargo,
What is the generic class?
How to create an instance of a class if the class has private constructor?
What are the two categories of data types in the java programming language?
What are the steps in the jdbc connection?
Are arrays primitive data types?
How do you do descending order in java?
whats the diff between jsp and servlets?
What is the difference between a switch statement and an if statement?