Suppose you enter 34.3, the ENTER key, 57.8, the ENTER key, abc, the Enter key. Analyze the following code.

```
1 Scanner input = new Scanner(System.in);
2 double v1 = input.nextDouble();
3 double v2 = input.nextDouble();
4 String line = input.nextLine();
```
a. After line 2 is executed, v1 is 34.3.
b. After line 3 is executed, v2 is 57.8.
c. After line 4 is executed, line contains an empty string.
d. After line 4 is executed, line is null.
e. After line 4 is executed, line contains character "abc".

abc See discussions in Section 12.11.3.

Computer Science & Information Technology

You might also like to view...

To delete the contents of a cell, click anywhere in the cell and press Delete

Indicate whether the statement is true or false

Computer Science & Information Technology

____ applications are stored on and run from portable removable storage devices such as flash drives.

A. Portable B. Local C. Web-based D. Mobile

Computer Science & Information Technology