What does the following JSP program prints on the browser when compiled and deployed on a Tomcat Server?
<% java.util.Calendar cal = java.util.Calendar.getInstance(); %>
<%= (cal.get(java.util.Calendar.DATE) % 2 ==0) ? "Even" : "Odd" %>
Prints Today's date
Prints Today's date and also Even
Prints Today's date and also Odd
Calculates whether today is even or odd. Prints Even if it is even else Odd
Back To Top