Multiple Choice
What (if any) type of error occurs with the following code if the user input is ABC? public static void main(String[] args)
{
Scanner in = new Scanner(System.in) ;
System.out.print("Enter a number: ") ;
String str = in.next() ;
Int count = Integer.parseInt(str) ;
System.out.println("Input is " + count) ;
}
A) Compile-time error
B) Run-time error
C) Overflow error
D) Illegal expression
Correct Answer:

Verified
Correct Answer:
Verified
Q13: What is the output of the following
Q15: What will be the value inside the
Q16: Assume the following variable has been declared
Q18: What will be printed by the statements
Q19: Which of the following statements is correct
Q20: Suppose a phone number, stored as a
Q21: What will be the value stored in
Q55: Which statement is true?<br>A)Variables cannot be assigned
Q60: Which of the given System.out.print statements generates
Q66: Consider the following Java variable names:<br>I.1stInstance<br>II.basicInt%<br>III.empName_<br>IV.addressLine1<br>V.DISCOUNT<br>Which of