代码如下:
public class Test99 {
private String a="a";
protected void test99Method(){
System.out.println(a);
}
} class Test99b extends Test99{
private String b="b";
protected void test99Method(){
System.out.println(b);
super.test99Method();
}
}
class Test99c extends Test99b{
private String c="c";
protected void test99Method(){
System.out.println(c);
//我这里想调用Test99中的test99Method()方法而非Test99b中的。请高手帮忙。
}
}
public class Test99 {
private String a="a";
protected void test99Method(){
System.out.println(a);
}
} class Test99b extends Test99{
private String b="b";
protected void test99Method(){
System.out.println(b);
super.test99Method();
}
}
class Test99c extends Test99b{
private String c="c";
protected void test99Method(){
System.out.println(c);
//我这里想调用Test99中的test99Method()方法而非Test99b中的。请高手帮忙。
}
}
解决方案 »
- 大家来谈谈java.lang.StackOverFlowError,以前没遇到过这个异常
- 并发的问题
- 关于calendar的小问题
- 请问下List 和 Map 还有 Set 到底在什么情况下用的 区别的话我是知道但太抽象了
- 高手求救,一个菜鸟的问题 再线等候
- 在java编译中,如何识别没有参与构建的二进制和代码
- apache+tomcat配置成功,但只有http://localhost/examples能用,为什么(shenzhipeng)
- 哪位朋友帮帮忙!谢谢了!
- 新人求助 color的 做的是cluedo
- jdbc close
- 请教一下.............................
- Swing中如何判断程序多重启动?
private String a="a";
protected void test99Method(){
System.out.println(a);
}
} class Test99b extends Test99{
private String b="b";
protected void test99Method(){
System.out.println(b);
super.test99Method();
}
protected void test99Method1(){ super.test99Method();
}\\这里写个函数嵌套调用好了 } class Test99c extends Test99b{
private String c="c";
protected void test99Method(){
System.out.println(c);
super.test99Method1();
}
我在这里的想法就是在JJTextField自已扩展Componentr的processKeyEvent方法而跳过JComponent中的那些步骤。