Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用十六进制值填充的字符串,如下所示:
received_Value = fffec780
该字符串未声明为十六进制字符串,它被声明为普通字符串并用此字符填充。但我必须将其定义为十六进制字符串才能转换为 int。
int_value_receive = Integer.parseInt(received_Value, 16)
因为这样做时我遇到了错误。
fffec780的值作为 anint大于MAX_INTEGER。
fffec780
int
MAX_INTEGER
尝试这个
Long.parseLong(received_Value, 16);