站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2ME 专题netbeans 的小问题

netbeans 的小问题

摘要: netbeans 的小问题


我的部分代码如下:
String actionString(int keyCode) {
if (keyCode == 0) {
return "";
}
//以下测试代码是否执行
String text = "abc";
Alert a = new Alert("测试", text,null, AlertType.ALARM);
display.setCurrent(a);
//测试结束

int action = getGameAction(keyCode);
switch (action) {
case FIRE:
return "Fire";
case LEFT:
return "Left";
case RIGHT:
return "Right";
case DOWN:
return "Down";
case UP:
retun "Up";
case GAME_A:
return "Game A";
case GAME_B:
return "Game B";
case GAME_C:
return "Game C";
case GAME_D:
return "Game D";
case 0:
return "";
default:
return Integer.toString(action);
}
}

为什么加上代码
String text = "abc";
Alert a = new Alert("测试", text,null, AlertType.ALARM);
display.setCurrent(a);
正常的retrun "Up"在编译时就变成了 retu "Up",而且还改正不了(在文件中改过return "Up"后编译时又变成retu "Up")。如果去掉这段代码,就能正常编译。
请大伙指点。


是我的问题太简单了,还是写的不清楚,请同行赐教!


感觉不太可能, 你用的哪个版本的? 没有理由这样


我也觉得奇怪,试了好多次。netbeans4.1


奇怪,同样的问题换个机器就没有了,都是xp+nt4.1。
郁闷ing......


不可能吧,你多试几次。。。。。


↑返回目录
前一篇: TextField如何显示变量内容
后一篇: 在jbuiler中不知道RMS的资源文件应该存放在什么地方