Solved

Consider the Following Code Snippet

Question 13

Multiple Choice

Consider the following code snippet:
If (in.hasNextDouble() )
{
Number = in.nextDouble() ;
}
Result = in.next() ;
If the input contains the characters 626.14 average, what values will number and result have after this code is executed?


A) number will contain the value 626 and result will contain the value 14.
B) number will contain the value 626.14 and result will contain the value average.
C) number will contain the value 0 and result will contain the value 626.14.
D) number will contain the value 0 and result will contain the value average.

Correct Answer:

verifed

Verified

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

Related Questions