Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
yes, you must use scanner, import it, then put this: if (playerAnswer.equalsIgnoreCase("apples "){ //put your code here (System.out.println(" "); /***you dont have to put player answer as your variable, you can have what ever you want as long as you declared it first***/ /***or you can make stats for each fruit in another class, then call them in your other class***/ } //hope that helped :)
13th Oct 2016, 10:23 AM
Aquarius
Aquarius - avatar