Java ArrayList of Arrays?

后端 未结 7 859
情书的邮戳
情书的邮戳 2020-12-05 01:43

I want to create a mutli dimensional array without a fixed size.

I need to be able to add items of String[2] to it.

I have tried looking at:

7条回答
  •  醉梦人生
    2020-12-05 02:31

    BTW. you should prefer coding against an Interface.

    private ArrayList action = new ArrayList();
    

    Should be

    private List action = new ArrayList();
    

提交回复
热议问题