System.in.read();
System.in.skip(1);
Exception has not been caught!
System.in.skip(1);
Exception has not been caught!
解决方案 »
- ext问题啊 求高手 重置不管用
- java如果判断一个字符串中是否有乱码
- Spring Bean工厂接口的设计思想
- 急!!Java具备以下能力能力在北京能找到月薪的工作!!
- javax.naming.NameNotFoundException: Unable to resolve 'logon'. Resolved ''; remaining name 'logon'
- strust2中,怎样在后台action中获取前台jsp中s:iterator中value中为#request.list的所有list对象的值?
- java算法精度问题
- 新手关于J2EE的问题
- 散分!
- jsoup获取<span id="curCredit">508</span>中的508失败,只能得到--
- Eclipse3.0+lomboz3.0+Tomcat5.0.25开发jsp问题
- 用main函数来测试ejb的sessionBean,运行到context = new InitialContext()时,出现如下错误.......
public static void main(String args[]){
int counter,grade,total,average;
total=0;
counter=1;
try{
while(counter<=10){
System.out.print("Enter letter grade:");
System.out.flush();
grade=System.in.read();
if(grade=='A')
total=total+4;
else if(grade=='B')
total=total+3;
else if(grade=='C')
total=total+2;
else if(grade=='D')
total=total+1;
else if(grade=='E')
total=total+0;
System.in.skip(1);
counter=counter+1;
}
}catch(IOException ex){
System.out.println(ex.getMessage());
}
average=total/10;
System.out.println("\"Class average is \""+ average);
}
}