Multiple choice technology programming languages

Which of the tag contains a code fragment valid in the page scripting language

  1. <%= expressions %>

  2. <% code fragment %

  3. <%! Declarations %>

  4. <%-- comment -- %>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The scriptlet tag <% code fragment %> contains Java code fragments that are executed during page generation. This is different from expressions (<%= %>) which evaluate and print, declarations (<%! %>) which declare class members, and comments (<%-- -- %>) which are ignored. Note: the option has a typo (missing '>' in closing tag).