[Logo]
Forums Register Login
Problem with if and elseif statements
I have just started learning java this semester so bear with me. I have this program that compiles fine but does not execute any of the if statements. Just the last one. any help and understanding is greatly appreciated..


Whar are the exact inputs you give....may be you miss '%' part.

Manish
put in extra System.out.println() statements. You will remove these later. But do things like

System.out.println("user input :" + level + ": as the level");

I put colons just before and after the variable so that i know if there are leading/trailing spaces. You can put statements like these all through your program. Usually, if it is nothing but a debug statement, I will even NOT indent them at all so they are easy to identify and remove later.
In the if statements it was looking for Platinum, not "platinum". Thanks for the help!
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 660 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 18, 2018 15:11:32.