Suppose you enter 34.3 57.8 789, then press the ENTER key. Analyze the following code.

```
Scanner input = new Scanner(System.in);
int v1 = input.nextInt();
int v2 = input.nextInt();
String line = input.nextLine();
```
a. After the last statement is executed, v1 is 34.
b. The program has a runtime error because 34.3 is not an integer.
c. After the last statement is executed, line contains characters '7', '8', '9', '\n'.
d. After the last statement is executed, line contains characters '7', '8', '9'.


b. The program has a runtime error because 34.3 is not an integer.

Computer Science & Information Technology

You might also like to view...

When you close a form or a report, the On Close event is triggered and Access executes the steps stored in the macro associated with the On Close event

Indicate whether the statement is true or false

Computer Science & Information Technology

The popular name for logically snarled program statements is ____ code.

A. noodle B. meatloaf C. spaghetti D. puzzle

Computer Science & Information Technology

Describe three reasons to use the Database Documenter tool

What will be an ideal response?

Computer Science & Information Technology

You can move the item marked 2 in the accompanying figure by selecting the ____ Tool and then dragging the point to a new location.

A. Free Transform B. Scale C. ActionScript D. Relocation

Computer Science & Information Technology