0

Why sunmicrosystem have seperated the concept of interface and abstract class even if they have the same functionality. Since in c++ there were no interface concept, why sun people have introduced the concept of Interface in java.

  • http://stackoverflow.com/questions/318064/how-do-you-declare-an-interface-in-c – Evan Knowles May 18 '15 at 06:29
  • 5
    If you think they have the "same functionality", I suggest you re-read your textbooks ... They do not have the same functionality. It only seems this way, if you don't think it through. – Stultuske May 18 '15 at 06:29
  • 1
    *even if they have the same functionality* - correction needed. They don't have the *same functionality* – TheLostMind May 18 '15 at 06:30
  • they are not same when it comes to versioning and coupling.you can always add a new virtual member to an abstract base class without breaking existing clients. That's not possible with interfaces. – Anirudha May 18 '15 at 06:31
  • In c++ a class with class with only pure virtual methods will be similar to `interface` in Java, You should also read about diamond problem – Nitin Dandriyal May 18 '15 at 06:32
  • Stupid as this may sound question does not deserve down votes. – Shahzeb May 18 '15 at 06:33
  • thanks for ur comments...... – Anurup Ghatak May 18 '15 at 07:18

0 Answers0