File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes How to convert from String to Integer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "How to convert from String to Integer?" Watch "How to convert from String to Integer?" New topic
Author

How to convert from String to Integer?

qionghua yang
Ranch Hand

Joined: Oct 31, 2000
Posts: 68
Hi there,
I have this String "12" and I would like to have an Integer. Is there any easy way to cast or convert it to an Integer? Thanks!
qionghua
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Use Integer.parseInt("12").
-Peter
qionghua yang
Ranch Hand

Joined: Oct 31, 2000
Posts: 68
Hi Peter,
It works. Thanks a lot!
qionghua
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert from String to Integer?
 
Similar Threads
String to Object conversion & vice-versa
Convert byte to its hex format?
Convert string to integer without any API ?
integer to string
Integer Conversion