Results 1 to 7 of 7

Thread: The size of an array

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 2004
    Location
    UK
    Posts
    671

    Re: The size of an array

    Quote Originally Posted by ComputerJy
    You can add to the array any time you want.
    But you can't assign the length to a variable until it has a value
    So if for example i assign 10 spaces for the array when i initialise it, can i then add more spaces once there is data in the array without losing the data?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: The size of an array

    Quote Originally Posted by x-ice
    So if for example i assign 10 spaces for the array when i initialise it, can i then add more spaces once there is data in the array without losing the data?
    Normally for a dynamically sized list, you would use one of the many Collection classes, like ArrayList for instance.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: The size of an array

    Quote Originally Posted by x-ice
    So if for example i assign 10 spaces for the array when i initialise it, can i then add more spaces once there is data in the array without losing the data?
    You can use arrays concatenation any time, without losing data
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width