This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Applets and the fly likes casting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "casting" Watch "casting" New topic


arun iyer

Joined: Nov 29, 2000
Posts: 28
i have stored certain data in a text file.
I use string tokenizer and get the data in the form of a string. How can i convert string to an integer.
Daniel Olson
Ranch Hand

Joined: Jan 05, 2001
Posts: 81
int num = Integer.parseInt( str );
It is sorta covered in the JavaRanch Style Guide.
subject: casting
It's not a secret anymore!