Question d’entretien chez LTM Limited

The asked Amostrong number code in Java