每当我尝试在valut中存储rsc.getString(2)的值时,我都会收到错误。
ArrayList<Integer> rowc = new ArrayList<>();
System.out.println("Select timing," + dayname + " from " + classid);
rsc = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE).executeQuery("Select timing," + dayname + " from " + classid);
String valut="";
while (rsc.next()) {
valut=rsc.getString(2);
if (!valut.equals("")) {
//valut=rsc.getString(2);
// if(rsc.getString(2).contains("LEC") ||rsc.getString(2).contains("prac") || rsc.getString(2).contains("tut"))
// if(!valut.contains("LEC") && (valut.contains("prac") || valut.contains("tut")) && !valut.contains("LEC(1)"))
if(valut.contains("LEC") ||valut.contains("prac") || valut.contains("tut"))
{ rowc.add(rsc.getRow());
rsc.next();
}
}
}