Results 1 to 2 of 2

Thread: Dynamic array.

  1. #1
    Join Date
    Sep 2008
    Posts
    11
    Rep Power
    0

    Default Dynamic array.

    I don't know the exact length of the array needed, it is going to be know during runtime. What is the best way that can be declared/used?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default Re: Dynamic array.

    Either declare your array when you know the exact length (during runtime) or use an ArrayList (or just a List).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Dynamic Subclasses?
    By MrFish in forum Advanced Java
    Replies: 5
    Last Post: 11-07-2010, 01:28 AM
  2. Dynamic String Array?
    By ladykrimson in forum New To Java
    Replies: 4
    Last Post: 10-13-2010, 04:37 AM
  3. Dynamic for loop
    By vikrambatra1709 in forum Advanced Java
    Replies: 3
    Last Post: 02-08-2010, 08:11 AM
  4. How increase dynamic array?
    By artemff in forum New To Java
    Replies: 5
    Last Post: 01-01-2010, 12:22 AM
  5. Dynamic GUI
    By ike2u in forum New To Java
    Replies: 4
    Last Post: 08-08-2009, 02:50 AM

Tags for this Thread

Posting Permissions

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