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.
You might also like to view...
A ________ box is used for a specific purpose and requires an action by the user
A) message B) dialog C) warning D) window
EXCEPT for ________, all of the following are formatting marks
A) paragraphs B) spaces C) tabs D) line spacing
Filtering refers to reordering records in either ascending or descending order based on the values in the field. _________________________
Answer the following statement true (T) or false (F)
Which line of code will add the value "East" to a ListBox object named lstDirections?
A. lstDirections.Add("East") B. lstDirections.Items.Add("East") C. lstDirections.AddValue("East") D. lstDirections.Items.AddValue("East")