标签:extends this ret super name sel str abstract self
package top.hyself;
abstract class A{
private String name;
public A(String name)
{
this.name = name;
}
public String getName()
{
return this.name;
}
public abstract void fun();
}
class B extends A{
public B(String name) {
super(name);
}
public void fun() {
System.out.println(super.getName());
}
}
public class This {
public static void main(String[] args)
{
B b = new B(null);
b.fun();
}
}标签:extends this ret super name sel str abstract self
原文地址:http://www.cnblogs.com/ELF-CH/p/7862993.html