Perry Smith

Java Questions & Answers

Home / Java Q & A Archive Page 3 / Java Q & A Archive

Input from a Keyboard
 Friday, 15-Jan-99 15:57:42

      209.162.145.104 writes:

      Another simple question:

      "System.in.read()" reads one character from the keyboard. What method will read a String?

      thanks,


      Diggory

Responses
Re: Input from a Keyboard
 Friday, 15-Jan-99 20:47:06

      24.1.16.214 writes:

      use a TextField or TextArea, which have getText()
      methods.


      -calyxa

      calyxa


Re: Input from a Keyboard
 Saturday, 16-Jan-99 12:31:18

      171.210.135.175 writes:

      System.in.readLn() is the method I believe you're looking for.

      MikeD


Correction to above
 Saturday, 16-Jan-99 12:33:08

      171.210.135.175 writes:

      sorry. ... it's "System.in.readLine()" the print and read methods aren't consistent.

      MikeD

Home / Java Q & A Archive Page 3 / Java Q & A Archive