Java: Armstrong number generator