Bal*_*usC 65
您可以使用括号表示法,[]
其中指定要检索的元素的(从零开始)索引.
<p>This is the 3rd item of the list: #{bean.list[2]}</p>
Run Code Online (Sandbox Code Playgroud)
这个语法基本上和bean.getList().get(2)
.
这相当于数组.
<p>This is the 3rd item of the array: #{bean.array[2]}</p>
Run Code Online (Sandbox Code Playgroud)
这个语法基本上和bean.getArray()[2]
.