Results 1 to 2 of 2

Thread: [resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Posts
    183

    [resolved]

    problem solved, thanks
    Last edited by Evil_Cowgod; May 13th, 2006 at 01:56 AM.
    When you ask a question, try and answer a few

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: four lines of simple code - inexplicable behaviour

    You must know that Scanner is not only for user Command Prompt input, it scans all kind of streams (memory, files, http, ...etc).

    In your case, the test will always return (!false==true)because the user didn't enter anything and there is no pending data in the (System.in) stream
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width