Search:

Type: Posts; User: Junky

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    18,898

    Re: catch negative numbers

    Chop some wood while you're in there. ;)
  2. Replies
    6
    Views
    18,898

    Re: catch negative numbers

    Yes there is, the call to nextDouble. The issue with the code is that the if statement handling the negative number is in the catch statement but a negative number will not cause an exception.
Results 1 to 2 of 2