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
Can a serialized object be transferred via network?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
How does sublist works in java?
Can we start a thread twice in java?
Why do we need variables?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
Can a set contain duplicates?
What are the four integer types supported by java?
What is the difference between serializable and externalizable interface?
What language is an assembler written in?
Can you override private or static method in java?
What is a function argument in java?
What is string [] java?
What is pojo class in java?
How is string immutable in java?