Perfect Number Calculator written in Java