There is another subtlety to our next sample program. A list of keyword strings is sent to the server, and the warehouse returns an instance of a class
Product. Of course, the client program will need the class file
Product.class to compile. However, whenever our server program cannot find a match for the keywords, it returns the one product that is sure to delight everyone: the Core Java book. That object is an instance of the
Book class, a subclass of
When the client was compiled, it might have never seen the
Book class. Yet when it runs, it needs to be able to execute
Book methods that override
Product methods. This demonstrates that the client needs to have the capability of loading additional classes ...