title: Return two arrays in a method in Java
body: <p>Considering I have two arrays for example:  </p>
  
  <pre><code>String[] array1 = new String[10];
  int[] array2= new int[10];
  </code></pre>
  
  <p>So that inside a method I've computed two arrays, namely <code>array1</code> &amp; <code>array2</code><br>
  and now I want to return both of these arrays. How should I go about it?  </p>
  
  <p>I read here that I can make another class and define certain object types and encapsulate these arrays in that class constructor, but I'm still confused and did not understand completely.</p>
  
  <p>If you could show me a working example which does that, or may be any similar idea, it would be good.</p>