Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Re: Why System.in returns -1 when I pressed "Enter key" how can I mimic "Enter key" in console?

    Did you look at the PipedInputStream and PipedOutputStream classes?
  2. Re: Why System.in returns -1 when I pressed "Enter key" how can I mimic "Enter key" in console?

    Read the API doc for the getNumericValue method to see when it returns a -1.
    A better way to see what is in the read variable: Integer.toHexString(read)
    or String.valueOf(read)
Results 1 to 2 of 2