Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

D Question 1 1 pts Write a statement that reads a word from the console into the variable firstWord. Assume that firstWord has already been

image text in transcribed
D Question 1 1 pts Write a statement that reads a word from the console into the variable firstWord. Assume that firstWord has already been declared as a String variable. Assume also that keyboard is a variable that references a Scanner object associated with the keyboard. D Question 2 1 pts Assume that name and age have been declared suitably for storing names (like "Tom", "Dick" and "Harry") and their ages respectively. Assume also that console is a variable that references a Scanner object associated with user input. Write some code that reads in a name and an age and then prints the message "The age of NAME is AGE" on a line by itself, where NAME and AGE are replaced by the values read in for the variables name and age. For example, if your code read in "Barry" and 70 then it would output "The age of Barry is 70" on a line by itself. HTML EditorE

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