In Java, a number is an Armstrong number if its own digits added together to the power of the number of digits results in the number itself. For instance, the Armstrong numbers 0, 1, 153, 370, 371, 407, 1634, 8208, and 9474 are both three- and four-digit Armstrong numbers.