Java为什么新建向上转型对象用‘对象名.getClass().getName()’方法获得的类型是子类类型,不应该是父类类型吗??
```class Asd{}
class Zxc extends Asd{
}
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
Asd asd=new Zxc();
System.out.print(asd.getClass().getName());
}
}

因为获得的就是他实际的类型。如果想得到父类的先getSuperclass()