Solved

Given the Java Statement Int Number1 = Input.nextInt();

Question 14

Multiple Choice

Given the Java statement int number1 = input.nextInt() ;
In which input is a Scanner, which of the following occurs if the user does not enter a valid int value?


A) A compilation error occurs.
B) The program continues executing and assigns the value 0 to number1.
C) A runtime logic error occurs.
D) None of the above.

Correct Answer:

verifed

Verified

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

Related Questions