How to pass elements of an arrayList to variadic function

前端 未结 3 1607
长情又很酷
长情又很酷 2020-12-11 00:23

I\'ve got an arrayList filled with elements. I would like to pass the elements of that array list as arguments to a variadic function.

My function

p         


        
3条回答
  •  情歌与酒
    2020-12-11 00:50

    The construct IEntityModifier... is syntactic sugar for IEntityModifier[]

    See the appropriate JLS section (8.4.1 Formal Parameters)

提交回复
热议问题