Abstract class or interface. Which way is correct?
问题 There are two way for choosing between abstract class or interface. Microsoft solution and Oracle solution: Microsoft, design guideline: Do use abstract (MustInherit in Visual Basic) classes instead of interfaces to decouple the contract from implementations. http://msdn.microsoft.com/en-us/library/ms229013.aspx Oracle, The Java Tutorials: If an abstract class contains only abstract method declarations, it should be declared as an interface instead. http://docs.oracle.com/javase/tutorial/java