java
CalvinGJH
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
向上转型 向下转型
Java向下转型的意义_yinhuanxu-优快云博客_向下转型 个人总结 前提存在两个类父类A子类B 向上转型 A a = new B(); 此时子类实例对象已经失去了子类中独有的方法 这种情况多数出现在泛型集合中,如list<A>,在向集合中新增元素时就存在向上转型的情况 向下转型 B b = (B)a 此时重新获得了因为向上转型而丢失的方法 ...原创 2021-10-21 15:17:46 · 116 阅读 · 0 评论 -
getSourse() 与getActionCommand 区别
getSource() Returns: The object on which the Event initially occurred. 依赖于事件对象 getActionCommand() Returns the command name of the action event fired by this button. If the command name is null (defa转载 2017-03-22 13:37:40 · 1087 阅读 · 0 评论
分享