[java] how many people type in this thing instead of "copy and paste"?

Discussion in 'OT Technology' started by nietsni3, Feb 9, 2005.

  1. nietsni3

    nietsni3 Guest

    static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
     
  2. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    it's not that hard to type... it's just 1 line but i think i have a library with common used functions and its there, so i just import the library and u know whats next :eek3:
     
  3. SEPHROTH64

    SEPHROTH64 Guest

    jbuilder finishes it for me :p
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    The profs at my school were kind enough to write a class for us called Keyboard, so I just add it to my build path and use Keyboard.in.
     
  5. zabuni

    zabuni New Member

    Joined:
    Jan 2, 2005
    Messages:
    64
    Likes Received:
    0
    People in the know use 1.5's new Scanner Class:

    Code:
       Scanner scan = new Scanner(System.in);
       int i = scan.nextInt();
       String blah = scan.nextLine();
       
    You have to import java.util.Scanner though
     
  6. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    EasyReader > that.
     

Share This Page