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

What is the statements?

789


Is string pool garbage collected?

756


What is the benefit of singleton pattern?

730


What is string args [] in java?

749


What is immutable class in java?

688


What is string in java is it a data type?

724


Difference between current previous versions of Java?

769


how does the run() method in runnable work? : Java thread

679


How do you input a string in java?

724


how do I create a runnable with inheritance? : Java thread

729


What are the supported platforms by java programming language?

788


What is the differences between heap and stack memory in java? Explain

720


What is the full meaning of java?

750


What is * argv?

916


Why java is secure? Explain.

761