Question: Exercise 2: Write a Java program that allows the user to choose the correct answer of a question. (25 Points) See the example below: What
Exercise 2: Write a Java program that allows the user to choose the correct answer of a question. (25 Points)
See the example below: What is the correct way to declare a variable to store an integer value in Java? a. int 1x=10; b. int x=10; c. float x=10.0f; d. string x="10"; Enter your choice: c
Using switch case, your program should tell the user if his/her entered choice was the correct answer or the incorrect answer. Note your program should also display the question and the options (as shown in the example) to the user.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
