title: how to add value from an array into a vector
body: <p>I am trying to store one value at a time from an array into a vector,so its like that the vector should increase its size dynamically.In my app,when we click start button,the value from the array goes to another page,where it is fetched,&amp; then displayed,but wen i am trying to add that value into a vector &amp; save it in persistent memory of blackberry,i can see only the last has been added into the vector,but i want the vector to one by one add all the values which i sent to the other page,here is the code,can anyone help me out</p>
  
  <pre><code>if ( quesNum != null &amp;&amp; quesCount &lt; quesNum.length )
  {
     Vector data = new Vector();
  
     data.addElement ( TestScreen.quesNumber + "" );
  
     synchronized ( curQues )
     {
  
        curQuesnew = quesNum[quesCount];
        curQues.setContents ( curQuesnew + "" );
        curQues.commit();
     }
  
     synchronized ( disques )
     {
  
        System.out.println ( "value is " + data );
        disques.setContents ( data );
        disques.commit();
     }
     synchronized ( disques )
     {
        data = ( Vector ) disques.getContents(); 
     }
  
     if ( data.contains ( quesNum[quesCount] + "" ) )
     {
        xyz = quesNum[quesCount++];
        System.out.println ( "i shall overcome........." );
  
     }
     else
     {
        System.out.println ( "hardwork conqures all........." );
        xyz = quesNum[quesCount];
     }
     return xyz;
  </code></pre>
  
  <p>this is the value which i am sending to the other page everytime we click next button,so i am trying to store the values into a vector,everytime one value is being sent,bt the vector only stores the lastest value,nt the entire values//</p>