private static String getVerifyCode(String idNumber) {
        int sum = 0;
        for (int i = 0; i < 17; i++) {
            sum = sum + Integer.parseInt(String.valueOf(idNumber.charAt(i))) * Integer.parseInt(Wi[i]);
        }
        return ValCodeArr[sum % 11];
    }
private static String getVerifyCode ( String idNumber ) { int sum = 0 ; for ( int i = 0 ; i < 17 ; i ++ ) { sum = sum + Integer . parseInt ( String . valueOf ( idNumber . charAt ( i ) ) ) * Integer . parseInt ( Wi [ i ] ) ; } return ValCodeArr [ sum % 11 ] ; }
根据身份证前17位计算身份证校验码