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
What is multithreading in java?
What are the kinds of polymorphism?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
What is an object in java and how is it created?
How do you sort an array in java?
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
How static variable work in java?
What is the function of java?
How to do a true java ping from windows?
How do you create a bulleted list?
Can an arraylist be empty?
Why we use methods in java?
What is the use of set in java?
What is java autoboxing?
Explain static nested classes ?