title: RMI exportObject(Remote obj, PORT); createRegistry(PORT);
body: <p>I'm wondering can both the </p>
  
  <pre><code>UnicastRemoteObject.exportObject(Remote,portNo) &amp; LocateRegistry.createRegistry(portNo);
  </code></pre>
  
  <p>porNo be the same? </p>
  
  <p>I test it works but I'm worrid if there is any complication? </p>
  
  <p>Why does exportObject need to specify an object to work? when I use exportObject(Remote obj) it throws an <code>NullPointerException</code>.</p>