A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
How to convert string to int ?
Zhixiong Pan
Ranch Hand
Joined: Jan 25, 2006
Posts: 239
posted
Feb 01, 2006 03:49:00
0
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
I like...
posted
Feb 01, 2006 04:10:00
0
Have a look at the parseInt() methods of the Integer class.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Sant
Greenhorn
Joined: Jan 28, 2006
Posts: 15
posted
Feb 01, 2006 16:53:00
0
int i=Integer.parseInt(String)
u can parse the string to int
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: How to convert string to int ?
Similar Threads
hashCode
Wrapper's String Constructor
Convert String to primitive int without using Wrapper classes
conversions
convert string to primitive integer
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter