Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Question 1
:
What gets printed when the following is compiled. Select the one correct answer.
<% int y = 0; %>
<% int z = 0; %>
<% for(int x=0;x<3;x++) { %>
<% z++;++y;%>
<% }%>
<% if(z<y) {%>
<%= z%>
<% } else {%>
<%= z - 1%>
<% }%>
1.
0
2.
1
3.
2
4.
3