title: Exiting of one program, not more
body: <p>So basically I'm doing a server and client in java.</p>
  
  <p>In order for it to run, I have to run both a <strong>client.java</strong> and <strong>server.java</strong>. I need to close one or both depending on the instance</p>
  
  <p>What I currently need is a way such that when the client passes a parameter x, the client should close but the server should remain open. I also have to implement it in such a way that if client passes parameter y instead, both the client and server should close</p>
  
  <p>I thought of doing:</p>
  
  <pre><code>System.exit(0);
  </code></pre>
  
  <p>But I'm not sure if this would close both server and client, meaning that it would be useful for the second instance. I also thought of just letting it reach the end of the program, but I'm not really sure what result would be the result of that.</p>