Results 1 to 2 of 2
  1. #1
    miss_dot is offline Member
    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0

    Default 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 09:03 AM.

  2. #2
    miss_dot is offline Member
    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0

Similar Threads

  1. How to convert a string into a BigInteger
    By valery in forum New To Java
    Replies: 4
    Last Post: 09-13-2011, 02:32 PM
  2. String to Float
    By durahman in forum New To Java
    Replies: 2
    Last Post: 02-12-2008, 01:17 AM
  3. Float to String
    By mew in forum New To Java
    Replies: 4
    Last Post: 12-29-2007, 06:08 PM
  4. Replies: 2
    Last Post: 11-16-2007, 02:24 PM
  5. Error with convert to Float
    By cachi in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •