File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -8,30 +8,25 @@ public static void main(String args[]) {
88 String choiceTwo = "jupiter" ;
99 String choiceThree = "saturn" ;
1010
11- String correctAnswer = choiceTwo ;
11+ String correctAnswer = choiceThree ;
1212
1313 // Write a print statement asking the question
1414 System .out .println (question );
1515
1616 // Write a print statement giving the answer choices
1717 System .out .println ("Choose one of the following: " +
18- choiceOne + ", " + choiceTwo + ", or " + choiceThree + "." );
18+ choiceOne + ", " + choiceTwo + ", or " + choiceThree + "." )
1919
2020 // Have the user input an answer
2121 Scanner scanner = new Scanner (System .in );
2222 // Retrieve the user's input
2323 String input = scanner .next ();
2424
25- // If the user's input matches the correctAnswer...
26- // then the user is correct and we want to print out a congrats message to the user.
2725 if (correctAnswer .equals (input .toLowerCase ())) {
2826 System .out .println ("Congrats! That's the correct answer" );
2927 } else {
3028 System .out .println ("You are incorrect. The correct answer is " + correctAnswer );
3129 }
32- // If the user's input does not match the correctAnswer...
33- // then the user is incorrect and we want to print out a message saying that the user is incorrect as well as what the correct choice was.
34-
3530 }
3631
3732}
You can’t perform that action at this time.
0 commit comments