lamb7758
2017-04-07 07:07while循环中的问题,是否与操作系统有关系?
Identification.identification 是一个全局的变量,某个时刻会给他赋值。希望循环中赋值后跳出循环。
这个循环 在windows下可以复制后结束循环。而在linux下一直循环
while (Identification.identification==null||Identification.identification.equals("")) {
/ System.out.println(123123123);
}
这个循环在windows和linux都可以跳出去
String flag = "";
while (true) {
System.out.println(123123123+"*****");
flag = Identification.identification;
if(!flag.equals("")){
Identification.identification="";
break;
}
}
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 通讯录管理系统: 通过电话号码查询通讯录,查不出东西。
- c语言
- 1个回答
- 通过JAVA按钮事件更新数据库内数据,同时动态的刷新窗口内显示的数据
- sql
- java
- eclipse
- 4个回答
- 用tensorflow做机器翻译时训练代码有问题
- python
- 神经网络
- tensorflow
- 2个回答
- 大佬们,能帮忙改成指针式的程序,成绩也可以升序或者降序输出
- c语言
- c++
- 1个回答
- 我这个只能捕获InputMismatchException异常,要想抛出该异常怎么写。
- java
- 1个回答
换一换