崩溃 !一个让新手很郁闷的问题
下面这些代码有问题:
public void update() {
String query =
"update UserManager set NAME=?,AGE=?,PHONE=?,PASSPORTNUMBER=? where ";
String select = "select * from UserManager where ";
String keyword = null;
String xuanze = null;
int zhenjia = 0;
while (true) {
System.out.println( "\n\t请选择更改方式: ");
System.out.println( "\n\t1.按姓名更改 ");
System.out.println( "\n\t2.按会员ID修改 ");
System.out.println( "\n\t3.返回上级菜单 ");
System.out.print( "\n\t请选择: ");
xuanze = dedao.next();
if (xuanze.equals( "1 ")) {
select = select + "NAME=? ";
query = query + "NAME=? ";
System.out.print( "\n\t请输入你要更改的会员的姓名: ");
keyword = dedao.next();
} else if (xuanze.equals( "2 ")) {
select = select + "UID=? ";
query = query + "UID=? ";
System.out.print( "\n\t请输入你要更改的会员的ID:(不要输入前面的0) ");
keyword = dedao.next();
}
else if (xuanze.equals( "3 ")) {