正在加载图片...
Inheritance o Child class can extend parent class o Gets all the parent's fields and methods OPrivate vs.protected ● Can use child for anything that's expecting parent (upcasting) OBut not vice-versa o Can only extend one class ONo multiple inheritanceInheritance lChild class can extend parent class lGets all the parent’s fields and methods ¡Private vs. protected lCan use child for anything that’s expecting parent (upcasting) ¡But not vice-versa lCan only extend one class ¡No multiple inheritance
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有