栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

java第十一章

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

java第十一章

Inheritance means that a class can extend another class

If a data field is declared in the superclass, you may hide it by redeclaring it in the subclass.

Polymorphism means that a variable of supertype can refer to a subtype object

In OOP, a reference variable can reference a subtype object. This is called polymorphism

You can't always successfully cast a superclass to a subclass.

Given two reference variables t1 and t2, if t1.equals(t2) is true, t1 == t2 may be true or false

Every class has a toString() method and an equals() methoD.

Invoking x.clear()returns the number of the elements in an ArrayList x.

Invoking x.get(0) returns the first element in an ArrayList x.

You can create an ArrayList using new ArrayList()

The size of an ArrayList can grow and shrink at runtime.

If a method is declared private in the superclass, you may declare the method protected in the subclass.

If a method is declared protected in the superclass, you may declare the method private in the subclass.

A final class can have instances.

A protected method can't be accessed by a subclass in a different package.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/981690.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号