What is the output of the following block of code?
try{
int num = Integer.parseInt("Two thousand");
System.out.println(num);
}
catch(NumberFormatException e)
{
System.out.println("Cannot convert to a number");
catch(Input MismatchException e) {
System.out.println("String cannot be converted to Integer");
*
(1 Point)
O 2000
Cannot convert to a number
0
O String cannot be converted to Integer
Answers
Answered by
2
Answer:
vn. please follow me on brainly
Similar questions
Math,
2 months ago
Science,
4 months ago
Physics,
4 months ago
Social Sciences,
9 months ago
Math,
9 months ago