当前位置: 技术问答>java相关
太失败啦,这么简单一个IO问题啊~~~~
来源: 互联网 发布时间:2015-02-04
本文导语: 不行啊,太失败了吧,这么简单一个问题: 我现在把程序改成这样 byte[] read=new byte[3]; String group; int g=5; boolean flag=false; while (!flag) { out.print("Please input how many groups n...
不行啊,太失败了吧,这么简单一个问题:
我现在把程序改成这样
byte[] read=new byte[3];
String group;
int g=5;
boolean flag=false;
while (!flag) {
out.print("Please input how many groups number you want to purchase(1-99):");
try {
in.read(read);
in.mark(0);
in.reset();
}
catch (IOException e) {
out.println(e.toString());
}
group=new String(read).trim();
g=Integer.parseInt(group);
if (g
我现在把程序改成这样
byte[] read=new byte[3];
String group;
int g=5;
boolean flag=false;
while (!flag) {
out.print("Please input how many groups number you want to purchase(1-99):");
try {
in.read(read);
in.mark(0);
in.reset();
}
catch (IOException e) {
out.println(e.toString());
}
group=new String(read).trim();
g=Integer.parseInt(group);
if (g