不 行啊:
提示
non-static method getQDDM()can not be referenced from a static context
提示
non-static method getQDDM()can not be referenced from a static context
解决方案 »
- 网络蜘蛛如何有效地处理页面中的相对路径?
- 公司开发 界面一般怎么布局设计呢 有专门的工具吗
- 什么是迭代呢?好多地方都提到迭代,是不是递归的同义词呀
- JBuilder2006为什么对应不同操作系统有多版本,java不是跨平台吗?
- 用过eclipse的朋友看过来
- 请whyxx(风之子)进来接分,太谢谢了!
- JBuilder字符位置显示奇怪,请问如何调整?
- 弱弱的问:把classpath设置成这样是什么意思?在线等待
- 能不能用JAVA作一个像MSN那样的东西,把浏览器个性化?高手们发表一下看法!!
- 今天pass了scjp,散分,我想给500,但不知道为什么只能给75,发言者就给分!
- 大家看看这个广播接受的部分怎么老出错呀!
- 两个JPanel的子类互相调用,出现空指针异常,谢谢!
return CLBM;
}
......
return CLBM;
}
这样定义后,现在在MainFrame中 提示:
non-static method getQDDM()can not be referenced from a static context刚才是在inputfrmae中提示
non-static method getQDDM()can not be referenced from a static context
return CLBM;
return QDDM;
return DDMC;
non-static method getQDDM()can not be referenced from a static context错误。
MainFrame
是传递过来的引用吗?如果是
这个MainFrame
是一个类名的话那么你的那些public方法都不是static的,那么是不能使用的
就算你的那些方法都改成static的话也必须里面引用到的变量
都是static的才行明白?
up
return CLBM;
}
public String getQDDM(){
return QDDM;
}
public String getDDMC(){
return DDMC;
}
都定义成static 而且clbm,qddm,ddmc也必须是static的这样才可以用