(int n)
| 1 | public class SquareDigit { |
| 2 | |
| 3 | public int squareDigits(int n) { |
| 4 | |
| 5 | String strDigits = String.valueOf(n); |
| 6 | String result = ""; |
| 7 | |
| 8 | for (char c : strDigits.toCharArray()) { |
| 9 | int digit = Character.digit(c, 10); |
| 10 | result += digit * digit; |
| 11 | } |
| 12 | |
| 13 | return Integer.parseInt(result); |
| 14 | } |
| 15 | |
| 16 | } |
nothing calls this directly
no outgoing calls
no test coverage detected