摘要:
public class User { private String userName; private String password; public User() { super(); } public User(String userName, String password) { super 阅读全文
posted @ 2019-01-16 21:00
李大鹏的博客
阅读(310)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2019-01-16 17:56
李大鹏的博客
阅读(227)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2019-01-16 12:44
李大鹏的博客
阅读(103)
评论(0)
推荐(0)
摘要:
创建子类的实例先调用父类的构造(因为有爹才有儿子),然后调用子类构造。 下面是简单的重写方法的实例 特别注意父类的方法在子类重写时,子类的方法权限一定要大于父类方法。 以下是重写失败的例子,权限问题! 下面左右连个实例涉及到this关键字,表示的是当前对象。所以调用子类的print方法 最后priv 阅读全文
posted @ 2019-01-16 09:46
李大鹏的博客
阅读(137)
评论(0)
推荐(0)
浙公网安备 33010602011771号