Search:

Type: Posts; User: that_guy

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    1,458

    [SOLVED] Re: Integer and if statement

    This is what I changed it to and it worked:


    do
    {
    if(done != null)
    list.add(Integer.parseInt(done));
    if(scan.hasNextInt() || scan.hasNext("done"))
    done = scan.nextLine();
    else
  2. Replies
    3
    Views
    1,458

    [SOLVED] Integer and if statement

    I am trying to determine if the user did not input a correct value without throwing an exception.

    I have a String variable, done, which stores the user input and then if it is not storing "done"...
Results 1 to 2 of 2