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



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

Answer / 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

More Core Java Interview Questions

What is an event?

2 Answers  


Do you know why doesn't the java library use a randomized version of quicksort?

0 Answers  


How to override equals() and hashCode() method in java?

1 Answers   Wipro,


What is the difference between a Window and a Frame?

6 Answers   Infosys, ProKarma,


Distinguish between a predicate and a function?

0 Answers  


What is the association?

0 Answers  


Why is a constant variable important?

0 Answers  


What is the reason that multiple inheritance is not possible in java??

1 Answers  


what is the diff between Servletcontext and servletconfig?

5 Answers  


Is string serializable in java?

0 Answers  


Difference between association, composition and aggregation?

0 Answers  


Can we declare main () method as non static?

0 Answers  


Categories