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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -