Search:

Type: Posts; User: Empower

Search: Search took 0.20 seconds.

  1. Replies
    11
    Views
    1,375

    Re: Exception in thread "main"?

    I realized that it works even without the nextLine(). So I believe it's all good now.

    My failure: Used a number that is not a double.
  2. Replies
    11
    Views
    1,375

    Re: Exception in thread "main"?

    What do you mean by input? If you mean code, that's exactly the one I'm using. Sorry if I misunderstood.

    --- Update ---

    I apologize - it was a failure at my end. Thank you for the nextLine()...
  3. Replies
    11
    Views
    1,375

    Re: Exception in thread "main"?

    First, I typed fnum = myscanner.nextLine() under the first one (fnum = myscanner.nextDouble()) but it really sounded stupid because I already defined fnum as a double. So I did something crazy and...
  4. Replies
    11
    Views
    1,375

    Re: Exception in thread "main"?

    I tried placing it under fnum = myscanner.nextDouble().
  5. Replies
    11
    Views
    1,375

    Re: Exception in thread "main"?

    Can you show me where should I place the .nextLine() please?
  6. Replies
    11
    Views
    1,375

    Exception in thread "main"?

    Hello, I recently decided to use the skills I acquired so far to build a basic calculator (very basic). But for some reason I get this exception when I run the program.

    Exception in thread "main"...
Results 1 to 6 of 6