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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents