Please see codes below, I did realize my mistake, (1) Modularizing the codes as below is not needed (2) once i call the method RandomNumber( Int Number2) in the loop, each time the loop runs it create a new object and save value returned, so all five values are in separate objects.