When it comes to collections, the Java standard library provides plenty of options to choose from. Among those options are two famous List implementations known as ArrayList and LinkedList, each with ...
ArrayListは削除後にシフト操作が発生するため、中央付近の削除が遅い。 LinkedListはリンクを更新するだけで済むため、特定のノードの削除は高速。
最近、相変わらずAndroid Studio(Java)を触っていますが、インスタンスを格納するArrayListの動きを勘違いしていたのでログを残します。 こんな形で、指定した<型>の配列を作ります。型にはクラスが入るので、intとかはラッパークラスのIntegerで指定する必要が ...