Multiple choice technology

Correct syntax of setProperty Action 1. 2.

  1. 1

  2. 2

  3. both

  4. none

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

Both syntax examples (1 and 2) are valid. In option 1, setProperty is nested inside the useBean body. In option 2, setProperty appears after the useBean tag closes. Both approaches work correctly - the nested approach is more compact while the separate approach is more flexible. Therefore option C 'both' is correct.