Which of the following are valid
JSP code fragments?
1.
<%@ page import="java.util.*" autoFlush="true"%>
<%@ page import="java.io.*" autoFlush="false"%>
2.
<%Date d = new Date();
out.println(d);
%>
3.
<%=
String val = request.getParameter("hello");
out.println(val);
%>
4.
<%!
Hashtable ht = new Hashtable();
{
ht.put("max", "10");
}
%>
5.
<%!
Hashtable ht = new Hashtable();
ht.put("max", "10");
%>
Select 2 correct options
a 1
b 2
c 3
d 4
e 5
Given answers: b, d
My question:
Why are options e(5) and option a(1) invalid?