www.webdeveloper.com
Results 1 to 2 of 2

Thread: bufferReader help

  1. #1
    Join Date
    Sep 2004
    Posts
    7

    Question bufferReader help

    i use " JCreator " to build my Java apps
    i get an error here -- BufferReader in = new ---
    and i get an error here -- BufferReader(new InputStreamReader(System.in));---

    -------------------------------------------------------------------
    import java.io.*;
    public class Enter {
    public static void main (String [] args)
    throws IOException {
    BufferReader in = new
    BufferReader(new InputStreamReader
    (System.in));
    String name = "";

    System.out.println("Enter your name: ");
    System.out.flush();
    name = in.readLine();
    System.out.println("Thank you. " + name);
    }
    }
    ------------------------------------------------------------------
    PLZ help

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Unless you created it, there is no class named BufferReader. There is, however, a class named BufferedReader.

    Your code should look like this:
    Code:
    BufferedReader in = 
        new BufferedReader(new InputStreamReader(System.in));
    In future, you may want to post the error message and line number for clarification.

    Regards.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles