0
How do I use Character Method? (Java)
I canât seem to properly remember how to compare a char variable using built-in methods I want to enter or continue the loop if the variable userrPlay is equal to y, ignoring case, how would I do this? https://code.sololearn.com/c5SVp7SlegQz/?ref=app
1 Answer
+ 1
just use the equality operator (== 'y' )
for case u can use two conditions joined by OR like while (userplay =='y' || userplay == 'Y' )