Syntax of Declaration Element
-
<%! code !%>
-
<%! code %>
-
<jsp: scriptlet code />
-
<%jsp code !%>
B
Correct answer
Explanation
JSP declaration elements use the <%! code %> syntax to define class-level variables and methods. These declarations become members of the generated servlet class, not part of the _jspService() method. Option A incorrectly closes with !%>, and the jsp:scriptlet format is for XML-style actions, not declarations.