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

How do you override a variable in java?

0 Answers  


What are Access Specifiers and Access Modifiers.

6 Answers   TCS,


Why do we need to override equals() and hascode() method of object class?

1 Answers   Cognizant,


How can we create a synchronized collection from given collection?

0 Answers  


what is the difference between pagecontext and servletcontext?

5 Answers   JBA Infotech, TCS,






i would like to attend for an interview of datalab technologies company i want to know the pattern of imnterview.

0 Answers  


What is polymorphism and what are the types of it?

0 Answers  


What does java final mean?

0 Answers  


Write a java program to check if a number is prime or not?

0 Answers  


What is OOP?

2 Answers   BMC, Microsoft,


What do you know about java?

0 Answers  


What is bubble sorting in java?

0 Answers  


Categories