what is main purpose of interface?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

placement papaers of spring computing technology

1026


Explain the term virtual machine?

592


Can you have two constructors in java?

503


What is the collections api?

577


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

507






What 4 doubled?

544


What is the locale class in java programming?

531


What is mvc in java?

559


What is the purpose of garbage collection in java, and when is it used?

566


What is float in java?

565


What do you mean by constant time complexity?

604


What state does a thread enter when it terminates its processing in java programming?

578


What environment variables are required to be set on a machine in order to run Java programs?

618


What is nan in java?

520


What are the problems faced by java programmers who don't use layout managers?

556