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 JSP code is invoked in a browser. Select the one correct answer.
<%= if(Math.random() < 0.5) %>
hello
<%= } else { %>
hi
<%= } %>
1.
The browser will print either hello or hi based upon the return value of random.
2.
The string hello will always get printed.
3.
The string hi will always get printed.
4.
The JSP file will not compile.