This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Roberto Perillo wrote:Well, I think they just wanted the code to be more readable...
I don't think it has anything to do with readability. But with being able to run your code
Have a look at following code:
Running the server and then the client, results in "Hello Roel" being printed to the console.
When I change the server's code to:
Running the server and then the client, results in a runtime exception:
Exception in thread "main" java.lang.ClassCastException: $Proxy0 cannot be cast to HelloService