Solved

What Exception Type Does the Following Program Throw? Public Class

Question 2

Multiple Choice

What exception type does the following program throw? public class Test {
Public static void main(String[] args) {
Object o = new Object() ;
String d = (String) o;
}
}


A) ArithmeticException
B) No exception
C) StringIndexOutOfBoundsException
D) ArrayIndexOutOfBoundsException
E) ClassCastException

Correct Answer:

verifed

Verified

Related Questions