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 r advatages of websphere? & how to deploy?
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....
What is the maximum length of a url?
Do I need java for windows 10?
What is purpose of applet programming?
Static Variable can referred in non-static method?
What is e java?
What is java english?
How many bytes is string in java?
Can you create an object of an abstract class?
What are the differences between string, stringbuffer and stringbuilder?
What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?