Which exception will the following throw?
Object obj = new Integer(3);
String str = (String) obj;
System.out.println(str);
B.
The second line tries to cast an Integer to a String.
Since String does not extend Integer, this is not allowed and a ClassCastException is thrown.