Multiple choice technology architecture

Syntax of Declaration Element

  1. <%! code !%>

  2. <%! code %>

  3. <jsp: scriptlet code />

  4. <%jsp code !%>

Reveal answer Fill a bubble to check yourself
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.