8 Replies Latest reply: Feb 25, 2010 6:47 AM by EJP RSS

    How to dynamicly adding the size of an array?

      i would like to adding the size of the "new information"
      public class Counter{
          Information inforArray [] = new Information [1];
         // String name, id;
          String output ="";
          int counter;
          public static Counter count = new Counter ();
          public void addInfor (String n, String id){
               counter++; // counter = id%1000;
              inforArray [counter] = new Information (n, id);
              output += inforArray [counter].toString();
      when the user input another new data, it would create a new array[index] by itself, like it would create a new array size, and copy the old array into a larger size, and delete the old array continuously

      sorry for trouble you all.......but i really hope that this would works,,,i'm admit that i'm asking silly question, but i really hope that someone with kind heart would guide me.....THANKS