Results 1 to 2 of 2
Like Tree3Likes
  • 3 Post By KevinWorkman

Thread: Need help!!!

  1. #1
    rpark712 is offline Member
    Join Date
    Sep 2011
    Rep Power

    Default Need help!!!

    Hello I'm trying to create a program that helps me manipulate the numbers inside a dat file.

    This is the data inside the dat file.
    These are random street addresses and I need to find a way to isolate the prime numbers in the address.
    But the problem is that the dat file is stored in a String data type and i need to put the street numbers in a double data type.

    Java Code:
    10441 Rogers Circle
    201 Lexus Dr
    10352 Alexis Ave
    601 Lazy Day Lane
    123 May St
    2356 Larry Lane
    2011 Bee Cave Rd
    1111 Hillcrest St
    1515 Linden Dr
    20873 Longhorn Dr

    For example how can I put the number 10441 in a double?

    I have no idea how to convert a String into a double.
    Last edited by rpark712; 02-10-2012 at 03:26 PM.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power

    Default Re: Need help!!!

    First off, you should probably use a more meaningful title for your post. Otherwise people will have no idea what the post is about and will skip over it. I'd recommend reading the link in my signature on asking questions the smart way.

    What exactly are you asking? What numbers? Why doubles? The short answer is "yes". What have you tried? Where are you stuck? Post an SSCCE, and we'll go from there.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

Posting Permissions

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