what is main purpose of interface?

Answers were Sorted based on User's Feedback



what is main purpose of interface?..

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

what is main purpose of interface?..

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

Post New Answer

More Core Java Interview Questions

Howmany number of objects we can store in an ArrayList. Is there any limit?

7 Answers   TCS,


Define "Access specifiers" in java.

0 Answers   HCL,


What is increment in java?

0 Answers  


What is boolean false?

0 Answers  


What is the purpose of java?

0 Answers  






What is early binding and late binding in java?

0 Answers  


why java does not support unsigned keyword?

1 Answers  


What is finalize method?

0 Answers  


Which collection object is faster to retrieving the data and inserting the data into it.

2 Answers   Jamcracker, Virtusa,


Why is string buffer better than string ?

0 Answers   Cyient,


What is lambda in java?

0 Answers  


What's the difference between int and integer in java?

0 Answers  


Categories