Results 1 to 2 of 2

Thread: String Variable

  1. #1
    Eric is offline Senior Member
    Join Date
    Jun 2007
    Posts
    111
    Rep Power
    0

    Exclamation String Variable

    I have the following problem, where work handles the data of Web services of the following way

    Java Code:
    String v[]= new String [100];
    it receives data of this way and it dispatches data of the same way,but you know that I cannot always leave this array with a static size, my doubt is how I can handle arrays with variable size?

    Eric

  2. #2
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default RE: String Variable

    You have to consult to the data base, save everything in arraylist and later to turn from arraylist to an Array of strings, here is the example:

    Java Code:
    ArrayList al = new ArrayList(); 
    String[] v = (String[])al.toArray(new String[1]);
    Marcus

Similar Threads

  1. how to Parse int to a string variable
    By raj reddy in forum Java Servlet
    Replies: 10
    Last Post: 01-09-2009, 07:41 PM
  2. how to Parse int to a string variable (pls hlp)
    By raj reddy in forum Threads and Synchronization
    Replies: 5
    Last Post: 06-10-2008, 06:32 AM
  3. make a variable name from a string?
    By Kinnikinnick in forum New To Java
    Replies: 3
    Last Post: 11-13-2007, 03:54 PM
  4. Help with variable assigment to String
    By silvia in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:43 AM
  5. Replies: 1
    Last Post: 08-03-2007, 10:52 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
  •