The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

String to Int

Posted by Matt Gerrans on September 28, 2001 at 4:27 PM

You are in luck, the Java designers agreed with you and included a static method in Integer that you can use like so:

String foo = "44";
int bar = Integer.parseInt( foo );

- MFG



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us