问个字符串的处理问题...汗
我有两个类:
class a{
string x = new string();
}
class b{
a tt[] = new a[10]();
public boolean test(string s){
String sql = "Select * from KeyWord as wt where wt.name='"+s+"'";
ResultSet rs = tcon.executeQuery(sql);
try{
while(rs.next())
{
tt[0].x = rs.getString(1);
}
catch(Exception e)
{
// e.printStackTrace();
}
}
}
}
可是每次执行老是出错!!!请问为什么?谢谢.在线等待.