[ Back | Previous | Next ]

Converting a String to int/double/float

Package:
java.lang.*
Product:
JDK
Release:
1.0.2
Related Links:
General
General
General
General
General
General
General
General
General
Runtime
System
Comment:
The following code snapshots :

String to int:

int i = Integer.valueOf( year ).intValue()

String to double:

int j = Double.valueOf( year ).doubleValue()

String to float:

int k = Float.valueOf( year ).floatValue()
1