Results 1 to 3 of 3
  1. #1
    djscorpio99's Avatar
    djscorpio99 is offline Member
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    0

    Exclamation To store a String in an Array[HELP]

    Suppose i have '10100145' as Input String which is stored in a variable let say ipstring.
    So i have to break the string such that each digit gets stored in an array like
    at arr[0] have 1,at arr[1] i have 0,at arr[2] i have 1 and so on .

    So Is there any method available to do the above ?
    Comments Appreciated.


    Thanks & Regards
    djscorpio99

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,789
    Rep Power
    7

    Default

    If you do not have to do this yourself then check out the methods of the String class. If the final array is an int array then you need to do a bit more work.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. how to store string in text file
    By santhosh_el in forum AWT / Swing
    Replies: 2
    Last Post: 04-03-2009, 06:21 AM
  2. Replies: 1
    Last Post: 03-31-2009, 06:40 AM
  3. how to store an ArrayList<string> into cookies?
    By perplexingtrax in forum Java Servlet
    Replies: 7
    Last Post: 01-12-2009, 12:30 AM
  4. Store String Tokenizer o/p onto an array
    By rajchief in forum New To Java
    Replies: 1
    Last Post: 08-08-2008, 09:00 PM
  5. I would then store a string...
    By susan in forum AWT / Swing
    Replies: 1
    Last Post: 08-07-2007, 04:15 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
  •