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. 配列と を組み合わせる最も簡単な方法は何ArrayListですか?
ArrayList
モジュロを使用:
int i=0; for(Foo f:fooList){ fooArr[i/5][i%5]=f; i++; }
最もクリーンではありませんが、機能し、いくつかの教訓が含まれています。
リストに要素が多すぎる場合は、例外が発生します。整数の飛び込みとモジュロのしくみについては、ここでさらに 2 つのヒントがあります。