[java] How to sum digits of an integer in java?