title: Join two arrays in Java?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/80476/how-to-concatenate-two-arrays-in-java">How to concatenate two arrays in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>I have two objects</p>
  
  <pre><code>HealthMessage[] healthMessages1;
  HealthMessage[] healthMessages2;
  
  HealthMessage[] healthMessagesAll;
  
  healthMessages1 = x.getHealth( );   
  healthMessages2 = y.getHealth( );
  </code></pre>
  
  <p>How should I join the two objects, so I can return only one:</p>
  
  <pre><code>return healthMessagesAll;
  </code></pre>
  
  <p>What's the recommended way?</p>