Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. Declare a Scanner type object reference
  2. Create a new Scanner object that will read from System.in. Assign the new object to your object reference
  3. Prompt the user to enter their name. Read in their input and store it in a variable.
  4. 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.
  5. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Do you believe that there is one best way to manage the HR?

Answered: 1 week ago