Multiple choice technology programming languages

Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

  1. 1

  2. 2

  3. 3

  4. 4

  5. abc

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

The c:forEach tag processes the comma-separated string as a collection. The 'begin' and 'end' attributes are zero-indexed relative to the items. Index 1 refers to the second item ('3') and index 2 refers to the third item ('2'). Therefore, 3 and 2 are printed.