Suppose you enter 34.3 57.8 789, then press the ENTER key. Analyze the following code.
Scanner input = new Scanner(System.in);
double v1 = input.nextDouble();
double v2 = input.nextDouble();
String line = input.nextLine();

a. After the last statement is executed, line contains characters '7', '8', '9'.
b. After the last statement is executed, line contains characters '7', '8', '9', '\n'.
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'.


d See discussions in Section 12.11.3.

Computer Science & Information Technology

You might also like to view...

Creating _______ element names to avoid name collisions eliminates the ability to use simple element names to describe data.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

(Mortgage Calculator Application) A bank offers mortgages that can be repaid in 10, 15, 20, 25 or 30 years. Write an application that allows a user to enter the amount of the mort- gage and the annual interest rate. When the user clicks a JButton, the application displays a table of the mortgage length in years together with the monthly payment as shown in Fig. 8.24.


```
a) Copying the template to your working directory. Copy the directory C:Examples Tutorial08ExercisesMortgageCalculator2 to your C:SimplyJava directory.
b) Opening the template file. Open the MortgageCalculator.java file in your text editor.
c) Customizing a JTextArea. After line 109, insert a statement that sets the bounds property of outputJTextArea to 16, 96, 298, 110. On the next line, add a statement that sets the editable property of outputJTextArea to false.
d) Adding code to the Calculate JButton event handler. Add the code specified in the steps e through m to the calculateJButtonActionPerformed event handler, which begins at line 134.
e) Declaring variables required to determine monthly payments. In calculateJBut- tonActionPerformed, declare int variable years and initialize its value to 10. Also, declare int variable months and double variable monthlyPayment.
f) Obtaining the user input and converting the annual interest rate to the monthly interest

Computer Science & Information Technology

The comment and ________ will show when you point to a worksheet cell containing a comment

A) the name of the comment creator B) the priority rating of the comment C) the date the comment was created D) related comments

Computer Science & Information Technology

A test plan to verify the accuracy of the application should be designed before coding the application.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology