import java.io.*;public class ReadHello {
  Public static void main (String args[]){
    int inChar;
    System.out.println("Enter a character:");
    try {
      inChar = System.in.read();
      System.out.print("You entered ");
      System.out.println(inChar);
    }
    catch (IOException e){
      System.out.println("Error reading from user");
    }
  }
}
刚学java,昨天才配置好编译环境。就照书上打了份代码。
上面是我照着书上打的一段代码,居然通不过。
编译提示为:
d:\javatext\ReadHello.jaca:4: <identifier>expected
  Public static main (String args[]){
         ^
d:\javatext\ReadHello.java:16: ';' expected
}
^
2 errors 
其中d:\javatext 为文件保存目录。文件保存名为:ReadHello.java
请大家指点一下。