Suppose you enter 34.3, the ENTER key, 57.8, 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 "\n".

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.

Computer Science & Information Technology

You might also like to view...

A company exchanges information with a business partner. An annual audit of the business partner is conducted against the SLA in order to verify:

A. Performance and service delivery metrics B. Backups are being performed and tested C. Data ownership is being maintained and audited D. Risk awareness is being adhered to and enforced

Computer Science & Information Technology

The “per inch” in the units dots per inch and pixels per inch is in _____.

A. square inches B. linear inches

Computer Science & Information Technology