- 2
How can i run this
if cond is not supporting, can't i use a string in if condition https://code.sololearn.com/cg2q7pOlTEdp/?ref=app
4 Answers
+ 23
In addition to Christian's answer,
ans is your Scanner object, but the user input is know. Use:
if(know.equals("yes"))
+ 1
Read up on String.equals().
0
thank you ..
and I'll read up that