What is the syntax for declaring a variable
-
<%! %>
-
<%= %>
-
<% %>
-
None of the above
A
Correct answer
Explanation
In JavaServer Pages (JSP), the <%! ... %> syntax is a JSP declaration, which is used to declare variables or methods that are compiled into the generated servlet class. <%= ... %> is an expression, and <% ... %> is a scriptlet.