能通过子类对象向上转型为父类对象调用父类static final修饰的方法吗?
class Ghu {/**
* @param args
*/
private final void kis() {
System.out.println("hello");
}
class ABC extends Ghu{
public final void kis(){
System.out.println("javac");
}
}
public class Abcd{
public void main(String[] args) {
// TODO Auto-generated method stub
ABC abc=new ABC();
abc.kis();
Ghu ab=abc;/*将子类对象向上转型为父类对象*/
ab.kis();
}
}