need help with parseInt

Posted by cmona on Stack Overflow See other posts from Stack Overflow or by cmona
Published on 2010-03-13T12:58:08Z Indexed on 2010/03/13 13:05 UTC
Read the original article Hit count: 318

Filed under:
|
|
|

hello,

how can i get for example the integer codeInt=082 from String code='A082' i have tried this:

int codeInt = Integer.parseInt(code.substring(1,4));

and i get codeInt=82 ,it leaves the first 0 but i want the full code '082'.

i thought of parseInt(String s, int radix) but i don't know how .

any help will be appreciated .
thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about parseint