问答详情
源自:2-9 JDBC实战---搭建视图层(下)

为啥删除不了!!!

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++;

}

}


提问者:qq_lol_9 2017-03-27 17:59

个回答

  • qq_lol_9
    2017-03-28 11:16:52

    prenious="OPERATION_DELETE"; 的双引号去了试试!!!