ArrayList retrieving value of object
<p>This is getting made in a static void method in the main class. (class being used for input).</p>

<pre><code>private static void Input(ArrayList list)
{
   //other code...

   Object b = new Object(number, hour, minutes, seconds);
   list.Add(b)
}
</code></pre>

<p>Next i have another static void method to display the objects within.
The thing is i want to group them on the number, and then display all the hours, minutes and seconds for the same number underneath each other.
Then the following number(s) with all there corresponding hours, mintutes and seconds.</p>

<p>But i am not sure how i can get the number for example the first array, and 2nd and so on.</p>

<p>How can i acces this? The syntax below does not work and not sure how to retrieve this value(s).</p>

<p>int var = array[0].number; //does not work</p>

<p>Also how do i make a instance of this object again? I cannot use new again can i?</p>

<pre><code> private static void Output(ArrayList list)
{
   while (i &lt; list.Count)
   {
      //keep track of current group (number)
      //announce group
      //...
   }
}
</code></pre>

<p>Regards.</p>
