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. ArrayIndexOutOfBoundsException
c. StringIndexOutOfBoundsException
d. ClassCastException
e. No exception


d

Computer Science & Information Technology

You might also like to view...

Which statement about trees is false?

a) A tree is a nonlinear, two-dimensional data structure. b) Each node in a tree must contain two links. c) Children of the same node are called siblings. d) A node with no children is called a leaf node.

Computer Science & Information Technology

Give the method header for the following methods:

Method Hypotenuse, which takes two double-precision, floating-point arguments

Computer Science & Information Technology

In BNF, the ____ is used to separate two alternative definitions of a nonterminal.

A. forward slash B. vertical bar C. backward slash D. asterisk

Computer Science & Information Technology

You join tables in SQL by including a condition in the ____________________ clause to ensure that matching columns contain equal values.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology