Convert from String to float in Java
Description
The following code shows how to convert from String to float.
Example
//w w w . j av a 2 s. c o m
public class Main {
public static void main(String[] args) throws Exception {
Float f = Float.valueOf("0.2").floatValue();
}
}
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »