# java-convert a String to an integer?



## T|Ff-GirL (Jun 28, 2001)

hi,
i'm wondering if it is possible to change a String to an integer value..
for example..
String aString = "12345";
to an integer?


----------



## Rockn (Jul 29, 2001)

Not if the string is a text string. YOu could write something that would step through the string and replace each item in it, but it seems the number of permutations of the input would ever keep this from working.


----------



## yul (Feb 11, 2003)

have u tried parseInt() ?


----------



## T|Ff-GirL (Jun 28, 2001)

hey,thanks parseInt() works


----------



## yul (Feb 11, 2003)

glad to be of some help


----------

