Convert directly hex string char to int in java?


I have a string that contains a value such as "0x1800785" (get from edtitext user input) but the function I want to give the value to requires an int, how can I convert this to an int? this is my code:

int offset=0xffffffff;//max 8 chars int newoffset=Integer.reverse(offset);

Thanks so much.

asked on Stack Overflow Sep 2, 2020 by hossein • edited Sep 2, 2020 by jps

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0