Operation Array ArrayList
-----------------------------------------------------------------------------
Creation String[] a = new String[10] ArrayList<String> list = new ArrayList<>()
Access a[index] list.get(index)
Update a[index] = "London" list.set(index, "London")
Size info a.length list.size()
Append list.add("London")
Insert list.add(index, "London")
Remove by index list.remove(index)
Remove element list.remove(element)
Remove all list.clear()
|
|
DEMO: demo/11-arrayList/06-prim-type/Error.java