wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Converstion of String To int Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Converstion of String To int" Watch "Converstion of String To int" New topic
Author

Converstion of String To int

Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Hi All,
Can someone help me with how to convert an String to a int....
I am writing a piece of code & I am having some problem if I used the intValue() function. Help.
Thanks,
Aruna
ali farid
Ranch Hand

Joined: Aug 26, 2000
Posts: 60
Hi
you can use this:
String str="123";
int i=Integer.parseInt(str);
Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Thx Ali,
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Converstion of String To int
 
Similar Threads
Unable to initialize two dimensional array in for loop
confuse code
Doubt on Varargs and overriding
Change a String to an int
how to read speific lines in a text file