Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

The first shaded statement is import java.util.Scanner;.

This statement imports


the package necessary to use the Scanner class.
The second shaded statement declares a Scanner object named inputDevice.
The third shaded statement uses the nextLine()method to retrieve a line of text
from
the keyboard and store it in the name variable.
The last shaded statement uses the nextInt()method to retrieve an integer from t
he
keyboard and store it in the age variable.
The first shaded statement is import java.util.Scanner;. This statement imports
the package necessary to use the Scanner class.
The second shaded statement declares a Scanner object named inputDevice.
The third shaded statement uses the nextLine()method to retrieve a line of text
from
the keyboard and store it in the name variable.
The last shaded statement uses the nextInt()method to retrieve an integer from t
he
keyboard and store it in the age variable.
The first shaded statement is import java.util.Scanner;. This statement imports
the package necessary to use the Scanner class.
The second shaded statement declares a Scanner object named inputDevice.
The third shaded statement uses the nextLine()method to retrieve a line of text
from
the keyboard and store it in the name variable.
The last shaded statement uses the nextInt()method to retrieve an integer from t
he
keyboard and store it in the age variable.

You might also like