(Choose 1 answer)
<% int sum = 0;
Assume that you need to write a JSP page that adds numbers from one to ten, and then print the output.
for(j = 0; j < 10; j++) { %>// XXX --- Add j to sum
<% } %>
// YYY --- Display the sum
Which statement when placed at the location XXX can be used to compute the sum?
A. <% sum = sum + j %>
B. <% sum = sum + j; %>
C. <%= sum = sum + j %>
D. <%= sum = sum + j; %>
Q: 24