why use interface? if interface declear a method implement
in class. why direct implement method in class

Answer Posted / fajruddin sk

interface mainly use as of my knowledge-----> (1) for loosely coupling(2)just declare a rule(3)for giving a special behavior(Marker interface) (4)for multiple inheritance

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between process and thread?

597


What is the advantage of OOP in java?

657


Can we override a variable in java?

543


what is optional in java 8?

550


What methodology can be utilized to link to a database?

504






What is variable and its types?

540


How can we make a class singleton?

570


Is there any difference between nested classes and inner classes?

533


why not override thread to make a runnable? : Java thread

553


What is string literal in java?

553


Is namespace same as package in java?

538


What are the disadvantages of object oriented programming?

588


How do you escape json?

538


What is the difference between dom and sax parser in java?

528


What does exclamation mean in java?

571