How to make ArrayList that work as two dimentional array in java?

后端 未结 7 1772
时光说笑
时光说笑 2021-01-23 20:16

I want to make arrayList object in java that work as two dimentional array. My question is how can we access value from specific dimention from arrayList.

in two diment

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-23 21:10

    You cane define like this

    1>

    List list = new ArrayList();
    

    Fetching

    list.get(i)[j];
    

    2>

    List> list = new ArrayList>();
    

    Fetching

    list.get(i).get(j);
    

提交回复
热议问题