Simple linear congruential generator in Java