import java.io.*;
class KeyIn
{
public static void main(String args[])
throws java.io.IOException
{
char ch;
System.out.println("press a key :");
ch = (char) System.in.read();
System.out.println("In key : "+ ch);
}
}
class KeyIn
{
public static void main(String args[])
throws java.io.IOException
{
char ch;
System.out.println("press a key :");
ch = (char) System.in.read();
System.out.println("In key : "+ ch);
}
}
这一行,有你这么用的吗?这算什么呀.
throws java.io.IOException
不用 import java.io.*; 就可以。
结了。