Page 901 - AP Computer Science A, 7th edition
P. 901

9. (A) An Integer cannot be cast to a String. Don’t confuse this with
System.out.println(intObj.toString()); 9
Note that if the first line of the code fragment were
Integer intObj = new Integer(9);
then the error would be detected at compile time.
//outputs





























































































   899   900   901   902   903