Question: Do the following in Java code: Declare a Scanner type object reference Create a new Scanner object that will read from System.in. Assign the new
Do the following in Java code:
- Declare a Scanner type object reference
- Create a new Scanner object that will read from System.in. Assign the new object to your object reference
- Prompt the user to enter their name. Read in their input and store it in a variable.
- Prompt the user to enter how many teeth they have in their upper jaw. Read in their input and store it in a variable. Multiple that value by two and display the result.
- Prompt the user to enter a joke. Read in their input and echo it back to the user.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
