為啥刪除不了?。?!
else if(OPERATION_DELETE.equals(in.toUpperCase())||
OPERATION_DELETE.subSequence(0, 1).equals(in.toUpperCase())||
? ? ? ?OPERATION_DELETE.equals(prenious))
{
prenious="OPERATION_DELETE";
if(1==step){
System.out.println("請輸入你要刪除的ID:");
}else if(2==step){
? ? ?try {
action.del(Long.parseLong(in));
System.out.println("刪除成功!");
} catch (NumberFormatException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
if(OPERATION_DELETE.equals(prenious)){
step++;
}
}
2017-03-28
prenious="OPERATION_DELETE"; 的雙引號去了試試?。?!