Search:

Type: Posts; User: SgtGarrison

Search: Search took 0.13 seconds.

  1. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    Yeah, Invalid Entry is supposed to print out if the account number is not ten digits and then System.exit is supposed to execute. However, it skips from the first prompt past the account number...
  2. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    It should end if a ten digit account number is not entered properly, however it executes System.exit() after the first prompt to continue. As for the second part, not sure what you are referencing.
    ...
  3. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    All curly brackets added. Program is still skipping to System.exit.



    import java.util.*;

    public class Unit6ParkerTom
    {
    public static final double SAVE_INTEREST = .04;
    public static...
  4. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    Alright, I did a lot of fiddling with my code and got it to compile, but now it is shutting down prematurely. For some reason, my program seems to skip over several segments of code and immediately...
  5. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    Don't I need an else there?

    And yes, I added more {}s.
  6. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    1 error found:
    File: C:\Users\Documents\MYNAME.java [line: 34]
    Error: Syntax error on token "else", delete this token
  7. Replies
    15
    Views
    2,825

    Re: Syntax error on Token else?

    I tried adding an additional parentheses, but then the error changed to saying that there is an error on the else token, delete this token.
  8. Replies
    15
    Views
    2,825

    Syntax error on Token else?

    So I wrote this program for a lab assignment and I tried to compile it and I got this syntax error - "1 error found: File: C:\Users\Documents\Unit6myName.java [line: 34] Error: Syntax error on token...
Results 1 to 8 of 8