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
Write a code to show a static variable?
What does isempty () do in java?
What is the difference between the font and fontmetrics classes in java programming?
Why is java so popular?
What is a numeric string?
What is the purpose of checked and unchecked exceptions in JAVA?
What is the purpose of abstract class?
What is Java Reflection API? Why it’s so important to have?
What are autoboxing and unboxing? When does it occur?
Which types of exceptions are caught at compile time?
What is boolean flag in java?
Why is stringbuffer faster than string?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What causes memory leak in java?
Can constructor be synchronized?