我得到错误在if(rs.next())和.getString在我的代码。这是我的代码我得到错误“If(rs.next())”和“.getString”
public void keyPressed(KeyEvent e) {
Function f = new Function();
Result rs = null;
String ans = "Key";
rs = f.find(jTextField1.getText());
try{
if(rs.next()){
jTextArea1.setText(rs.getString("Key"));
}
}catch(Exception ex){
}
}
和错误是? – 2015-03-13 12:39:08
找不到符号 – 2015-03-13 12:39:31
那么意味着'Result'类没有名为'next'或'getString'的方法。 – TNT 2015-03-13 12:41:07