add java solution for hex_to_decimal