Creating an instance of this class calls the constructor in the same way as for a normal local class. The constructor initializes instance variables of the class. |
In this case, we also call the constructor of the parent class by using the keyword "super". This call starts the server of the unicastremoteobject listening for requests on the incoming socket. Note that an implementation class must always be prepared to throw an exception if communication resources are not available. private String name; //instance variable public HelloImpl (String s) throws java.rmi.RemoteException { super(); name = s; } |