The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

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:

java

Posted by Dhananjay on January 26, 2001 at 12:54 PM

> I try to write an calculator application, and i use for this
> an Text field, but how can i convert a String in to a int or double ??

you can use rapper class.Integer and Double for converting the string in int or double..
eg
int i =Integer.parseInt(String);

Where String is your input from text field




Replies:

Sponsored Links



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