36.5k views
5 votes
If var = keyboard.nextInt(); var must be defined as which of the following types? *

User Asara
by
4.9k points

1 Answer

7 votes

keyboard.nextInt(); This is an example of using the scanner class to get input from the user. The nextInt(); function means that you're getting an integer from the user.

var must be defined as an int.

User Romnick Susa
by
5.0k points