java.lang.Error: Unresolved compilation problem:
Unhandled exception type IOException at com.hui.hello.main(hello.java:18)
Exception in thread "main"
Unhandled exception type IOException at com.hui.hello.main(hello.java:18)
Exception in thread "main"
{ /**
* @param args
*/
public static void main(String[] args) throws Exception
{
//String mystring;
int count=0;
//int j;
System.out.println("please input a number:");
//j=System.in.read();
int j;
//j=0;
j=System.in.read();
while(count==j)
{
System.out.print("input a command for exit!");
//mystring=System.in.toString();
}
System.out.println("this a number:"+j);
}
}
帮忙运行一下,然后解释一下结果为什么是这样?不懂!!谢了!!