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

26th Dec 2018, 1:08 AM
Dylan Smith
Dylan Smith - avatar
1 Antwort
+ 1
just use the equality operator (== 'y' ) for case u can use two conditions joined by OR like while (userplay =='y' || userplay == 'Y' )
26th Dec 2018, 11:01 AM
Asirap