Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    What prints out at the end of the invalid input messages that shows what causes the program to exit?
    Invalid Entry ???????
  2. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    Sorry, I don't know anything about DrJava.

    What prints out for the invalid input that causes the program to exit?
    Invalid Entry ???????
  3. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    what value of input is causing the code to execute the System.exit()? Add the variable at the end of the println() so it is printed out.

    Can you copy the full contents of the console window from...
  4. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    I still see lots of if and else statements that do NOT have the following statements enclosed in {}s.
  5. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    I don't know. Are the compiler errors fixed now?

    Post your current code if you have questions about it.
  6. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    The compiler thinks that the else is misplaced and should be removed.

    Did you see the following?

    One problem I see with the code is there are some if statements that do NOT have {}s following...
  7. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    The compiler often only finds one error at a time because that error hides the next error(s). A missing ) is a big deal and needs to be fixed so the rest of the tokens can be properly placed.
    ...
  8. Replies
    15
    Views
    2,848

    Re: Syntax error on Token else?

    I think this is the key part of the message. The compiler thinks there should be a ) at the indicated location.
    Check the code for properly pairing of ( and ) and see why the compiler thinks there...
Results 1 to 8 of 8