public static String toChecksumAddress(String address) {
        String lowercaseAddress = Numeric.cleanHexPrefix(address).toLowerCase();
        String addressHash = Numeric.cleanHexPrefix(Hash.sha3String(lowercaseAddress));

        StringBuilder result = new StringBuilder(lowercaseAddress.length() + 2);

        result.append("0x");

        for (int i = 0; i < lowercaseAddress.length(); i++) {
            if (Integer.parseInt(String.valueOf(addressHash.charAt(i)), 16) >= 8) {
                result.append(String.valueOf(lowercaseAddress.charAt(i)).toUpperCase());
            } else {
                result.append(lowercaseAddress.charAt(i));
            }
        }

        return result.toString();
    }
public static String toChecksumAddress ( String address ) { String lowercaseAddress = Numeric . cleanHexPrefix ( address ) . toLowerCase ( ) ; String addressHash = Numeric . cleanHexPrefix ( Hash . sha3String ( lowercaseAddress ) ) ; StringBuilder result = new StringBuilder ( lowercaseAddress . length ( ) + 2 ) ; result . append ( "0x" ) ; for ( int i = 0 ; i < lowercaseAddress . length ( ) ; i ++ ) { if ( Integer . parseInt ( String . valueOf ( addressHash . charAt ( i ) ) , 16 ) >= 8 ) { result . append ( String . valueOf ( lowercaseAddress . charAt ( i ) ) . toUpperCase ( ) ) ; } else { result . append ( lowercaseAddress . charAt ( i ) ) ; } } return result . toString ( ) ; }
Checksum address encoding as per
<a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md">EIP-55</a>.

@param address a valid hex encoded address
@return hex encoded checksum address