|
convert string to float
hello.. i'm actually doing a calculation for mobile aplication using netbeans.. i got some problem when i'm trying to convert string to float.. cn anybody tell me? actually.. i can just convert string into integer using Integer.parseInt .. but i don't really know why i couldn't use Double.parseDouble or Float.parseFloat in netbeans.. i though that syntax is exist isn't it? hm.. does anybody got any suggestion for me in order to return string value as float or double?
i'm actually do a coding like this--
cobz = Integer.parseInt(textfield.getString());
because this is the only way for me to retrieve the 'input' form user in the text field. so i need to convert that 'string; into 'float' or 'double' to complete my calculation coding; not really by convert into integer.. but i really got a problem with this.. so please anyone help me...
-thanks guys-
Last edited by miss_dot : 11-14-2007 at 10:03 AM.
|