This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes How to convert string to int ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to convert string to int ?" Watch "How to convert string to int ?" New topic
Author

How to convert string to int ?

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi ranchers,
Can anyone tell me how to convert a string primitive to an int primitive.


SCJP 1.4 SCJD
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Have a look at the parseInt() methods of the Integer class.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sant
Greenhorn

Joined: Jan 28, 2006
Posts: 15
int i=Integer.parseInt(String)
u can parse the string to int
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert string to int ?