This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Just try: Object toto = new Object(); String s =(String)toto; Result: java.lang.ClassCastException: IntDoCheckCast at test/Bobby.<init>(Bobby.java:20) at test/Bobby.main(Bobby.java:26) An Object is not a String! W.