Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ArrayList次のようなループ内で sを動的に作成したい:
ArrayList
for (i = 0; i < 3; i++) { List<myItems> d(i) = new ArrayList<myItems>(); }
私がやりたいのは、ループ内にそのようなリストを 3 つ作成することだけです。それをしてもいいですか?
代わりにaList<List<MyItem>>を用意して、ループに入れます
List<List<MyItem>>