private static int squareSum ( final int pvalue ) { int result = 0 ; for ( final char valueDigit : String . valueOf ( pvalue ) . toCharArray ( ) ) { result += Character . digit ( valueDigit , 10 ) ; } return result ; }
calculate square sum .