java - Why to use interface while we can make all methods abstract? -


this question has answer here:

in abstract class can make methods abstract can work interface, why use interface @ all?? 1 of reason come can implement multiple interface not extend multiple class.. there design or performance related thing involved??

you got answer. using interfaces can enforce multiple types of behaviours using classes not work you. example, can enforce class icomparable inumerable not possible if want classes.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -