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...
Type: Posts; User: SgtGarrison
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...
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.
...
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...
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...
Don't I need an else there?
And yes, I added more {}s.
1 error found:
File: C:\Users\Documents\MYNAME.java [line: 34]
Error: Syntax error on token "else", delete this token
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.
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...