public static float string2float(String input) {
float output = 0;
try {
output = Float.valueOf(input.trim()).floatValue();
}
catch (NumberFormatException ex) {
System.out.println("NumberFormatException: " + ex.getMessage());
}
return output;
}
Tuesday, January 19, 2010
Subscribe to:
Posts (Atom)