Multiple Choice
How do you fix this code snippet to make it print out the sum when the user enters a letter rather than a double? The user must enter at least one double when the program begins.
A) while (in.hasData() ) ;
B) while (!in.hasEnded() ) ;
C) while (in.hasNextDouble() ) ;
D) while (hasData) ;
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q17: What changes do you need to make
Q18: What is the last output line of
Q19: What will be printed by the statements
Q20: Assuming the variable n is an integer
Q21: Which of the following loops executes 8
Q23: What is the best strategy for avoiding
Q24: What are the values of i and
Q25: What is the output of this code
Q26: When hand-tracing a portion of code, which
Q27: A loop inside another loop is called