是的方法名写错了,readLine();

解决方案 »

  1.   

    我给你改了一下import java.io.*;
    /*
     JHelloWorld
     @author zhf
     @version helloworld 1.0
    */
    class JHelloWorld 
    {
        public static void main(String[] args) 
        {
            try
            {
    String str;
    DataInputStream  stream=new DataInputStream(System.in);
    System.out.println("Please Enter Words:\n");
    str=stream.readLine();//不能识别
    System.out.println(str);
       
    stream.close();
            }
           catch(IOException e)
            {
            }
        }
    }你的readline()应该这样写readLine(),“l”应为大写