Custom number class to be used as out parameter
<p>There is no "out" or "ref" parameter in Java (I maybe wrong because I haven't touched Java in 3 yrs.). I am thinking create classes, like MyInteger, MyFloat and MyDouble, to be used as out parameter. is there a way to combine them into ONE generic class?</p>

<p>Sample code for MyInteger class:</p>

<pre><code>public class MyInteger
{
   private int value = 0;

   public int getValue(){ return value;}
   public void setValue(int newValue) {value = newValue;}

}
</code></pre>

<p><strong>EDIT:</strong></p>

<p>how to use MyInteger class:</p>

<pre><code>public boolean aMethod(int input, MyInteger output)
{
   boolean status = true;
   //calculation here;
   //set status to false if anything wrong;
   //if nothing wrong do this: output.setValue(newValue);
   return status;
}
</code></pre>

<p><strong>EDIT 2:</strong> </p>

<p>What I am asking is I hope I can combine MyInteger, MyFloat, ... into ONE generic class.</p>
