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