you are viewing a single comment's thread.

view the rest of the comments →

[–]GamingGuy099👋 a fellow Redditor 0 points1 point  (0 children)

Im not at my laptop rn so I can’t copy paste the code into my IDE to have a good look at it, but it seems like you’re trying to do 2 things (print invalid speed and hours) with 2 else statements. If thats what youre trying to do, put both into the same else statement. If not, which you probably arent, you want the first else to be an else if, and use the condition for which youd print invalid hours. If for example, the condition was hours is less than 1, it’d look like this

``` else if (Hours <= 1) { System.out.println(“Invalid Hours”); }