For loop: Using Two Loop Indexes
<HTML>
<HEAD>
<TITLE>Using Two Loop Indexes</TITLE>
</HEAD>
<BODY>
<H1>Using Two Loop Indexes</H1>
<%
for (int i = 0, doubleIndex = 0; i <= 10;
i++, doubleIndex = 2 * i) {
out.println("i: " + i +
" doubleIndex: " + doubleIndex + "<BR>");
}
%>
</BODY>
</HTML>
Related examples in the same category