Question: 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
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
Get step-by-step solutions from verified subject matter experts
