Question: 1.Write a Java statement that declares and creates an object input of the Scanner class and sets it to read from the keyboard. Start the

1.Write a Java statement that declares and creates an object input of the Scanner class and sets it to read from the keyboard. Start the declaration in the first column. Include whitespace only as necessary.

For this question, I am really not sure that the aswer between Scanner in = new Scanner(System.in); and Scanner input = new Scanner(System.in);

Which one is an answer and please briefly explain?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!