How can I create a 3 column table in HTML from an ArrayList?
My current code looks like this:
<table border="0">
<%
for (int i = 1; i < states.size(); i++) {
%>
<TR>
<%
for (int col = 1; col <= 3; col++) {
%>
<TD>
<%
out.println(states.get(i));}
%>
</TD>
</TR>
<%
}
%>
</table>
I get a 3 column format table but 3x the same entry in each row...

Expected output
Albania | Algeria | American Samoa
Andorra | Angola | Anguilla
..
What am I missing?