title: Is it a bad practice to use arrays as parameter(s) to return multiple values
body: <p>I sometimes (actually, often) find myself using a one-element array to return multiple values from a method. Something like this:</p>
  
  <pre><code>public static int foo(int param1, int param2[], String param3[])
  {
      // method body
      ....
      // set return values
      param2[0] = &lt;some value&gt;;
      param3[0] = &lt;some value&gt;;
  
      return &lt;some value&gt;;
  }
  </code></pre>
  
  <p>Is this a bad practice? (It seems like it is because some of my friends said they didn't know what it was doing for 2 seconds!)
  But the reason I used this in the first place was because this looked closest to what is know as <code>pass-by-reference</code> in C++. And the practice wasn't discouraged in <code>C++</code>, so ...</p>
  
  <p>But if this is really a wrong way of doing things, any idea how to rewrite this in the clean way?</p>
  
  <p>Thanks</p>