Solved

How Do You Fix This Code Snippet to Make It

Question 22

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. 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) ;


A) while (in.hasData() ) ;
B) while (!in.hasEnded() ) ;
C) while (in.hasNextDouble() ) ;
D) while (hasData) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions