摘要: 协变类型返回也是覆盖方法的一种,jdk5开始支持的一种:子类覆盖方法返回可以是子类返回的子类,这个比较拗口 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ 阅读全文
posted @ 2016-07-06 10:46 lifeng_study 阅读(871) 评论(0) 推荐(0) 编辑
摘要: 多态值得注意的地方:成员变量,和静态方法是不存在多态的概念的 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.fengli; /* 阅读全文
posted @ 2016-07-06 10:18 lifeng_study 阅读(145) 评论(0) 推荐(0) 编辑