Results 1 to 3 of 3

Thread: about scan any value

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Answers
    1

    Question about scan any value

    hello..everyone..
    I just want to know that is their any short step to
    read any numbers or characters easily in java......
    without buffer reader or any such big size coding.


  2. #2
    Expert Member
    Join Date
    May 2009
    Answers
    1,374

    Re: about scan any value

    Hi Ritwik,

    That's ony shortrcut to read characters & numbers.

    It will be a complicated one ,If u use scanner class to read characters & numbers

    To read a String, you use in.nextLine();

    Then convert the string to character by giving

    char nameOfCharacter = nameOfString.charAt(0);

    Thanks,
    Riju.


  3. #3
    Junior Member
    Join Date
    May 2008
    Answers
    6

    Re: about scan any value

    char whatEver = System.in.read();
    also works for scaning a char at a time.


  4.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact