Which of the following are valid iteration mechanisms in jsp?
a. <% int i = 0;
while(i<5)
{
"Hello World"
i++;
} %>
b. <jsp:for loop='5'>
"Hello World"
</jsp:for>
c. <% int i = 0;
for(;i<5; i++)
{ %>
"Hello World";
<% i++;
}
%>
Answer: C
Java | Advance Java | Multiple Choice | Questions and Answers | Test Bank
a. <% int i = 0;
while(i<5)
{
"Hello World"
i++;
} %>
b. <jsp:for loop='5'>
"Hello World"
</jsp:for>
c. <% int i = 0;
for(;i<5; i++)
{ %>
"Hello World";
<% i++;
}
%>
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.