0
Why is my if statement with an or operator not working?
3 odpowiedzi
+ 3
Like this it works:
if (inputMonth.equals("Jan") || inputMonth.equals("Mar"))
What is before and after || has to result in 0 or 1.
+ 1
you can put as many || in an if sentence as you want, so you can just write other months in the same if statement
0
do i have to do || inputMonth.equals() 5 more times cause i have 5 more months to put in. is there a way to condense it