What is difference between abstract class and interface

1. A sub class could implements more than one Interface, however it could only extends one Abstract class

2. Every method in interface should be abstract,but this is not necessary in abstract class

3. Interface will contain only  final static variables, but abstract class could have final variables and Instances Variables.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章