错误很明显阿
getField(Child) int UseChild cannot be applied to (Parent)
英语不过关阿
UseChild的getField不能应用于Parent类型,你应该把父类子类换过来,你用返了
getField(Child) int UseChild cannot be applied to (Parent)
英语不过关阿
UseChild的getField不能应用于Parent类型,你应该把父类子类换过来,你用返了
解决方案 »
- 求大神指点如何用js+SSH 实现下载功能 ? 下面是上传的实现
- struts2文件下载问题
- 大数据查询还要做筛选,帮忙了
- spring关闭数据库连接问题
- Could not load net/sourceforge/jtds/jdbc/Messages_zh_CN.properties这个错误是怎么回事啊?
- 谁帮我看看 这个JAVABEAN 是什么问题 谢谢 急需要
- Struts in Action Source Code
- 如何让tomcat显示我自己的index.jsp文件???急!!!!!
- 各位帮忙-给我点初学J2EE的建议
- 关于访问EJB环境的问题?在线等待……
- 会者不难:怎么映射tomcat5.5.4的默认根目录到指定的文件夹?
- 我在TOMCAT中配置了SSL,为什么每次都会弹出一个是框框?
int field;
}
class Child extends Parent{
int field;
}
class UseParent{
static int getField(Parent p){
return (p.field);
}
}public class View{
public static void main(String [] args){
Child c=new Child();
System.out.println(UseParent.getField(c));
}
}