How to traverse Table data in Java and pass that to servlet for using in JSP
<p>I am a PHP programmer and got to know that for me Object oriented-ness, Strict type, and missing powerful array from PHP can be a big problem in Java. 
I tried to get code related to above question but no one works. </p>

<p>My questions:</p>

<p>How to traverse table in various way?<br>
Is there any good tutorial for me related to collection that can be helpful for PHP programmer. I learned Oracle tutorial but that has not solved my problem. That may require lots of attention! I need practical way to learn.<br>
Is there any good method to know how object are structured inside? In PHP I can use print_r, var_dump and can see what is inside.</p>

<p>Here is more explanation asked by a commenter:      </p>

<pre><code> try {  
   ArrayList Rows = new ArrayList();  

   while (resultSet.next()){  
   ArrayList row = new ArrayList();  
   for (int i = 1; i &lt;= 7 ; i++){  
           row.add(resultSet.getString(i));  
   }  

   Rows.add(row);  
}  
</code></pre>

<p>Here, do I have a leisure to add complete rows at a time and use that in ArrayList? I do not want to use getString()/getInteger() etc on each column. Or in Java, I need to get every column data one by one.  </p>
