Solved

What Exception Type Does the Following Program Throw? Public Class

Question 3

Multiple Choice

What exception type does the following program throw? public class Test {
Public static void main(String[] args) {
Object o = null;
System.out.println(o.toString() ) ;
}
}


A) ArrayIndexOutOfBoundsException
B) ClassCastException
C) NullPointerException
D) ArithmeticException
E) StringIndexOutOfBoundsException

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