how to store previous number in Java?
<p>hi I'm new to java and having trouble solving this. </p>

<pre><code>void setNumber(int inputNumber)
{
    int currentNumber = inputNumber;
    int previousNumber = ??????????

}
</code></pre>

<p>so if inputNumber is " 2 " , then currentNumber should be " 2 "
and I want to change inputNumber to something else but I want previousNumber to be " 2 " 
and on and on, previousNumber to have one step before currentNumber's new value. 
how can I do this? </p>

<p>Thanks! </p>
