import java.util.ArrayList;

  ArrayList<String> list = new ArrayList<String>();
  list.add("hi"); 
  list.add("hey"); 
  list.add("hello"); 
  list.add("nice");
true
System.out.println(list);
[hi, hey, hello, nice]

add(int index, element)

list.add(1, "test");
System.out.println(list);
[hi, test, hey, hello, nice]

addAll(int index, Collection collection)

ArrayList<String> list2 = new ArrayList<String>();
list2.add("apple"); 
list2.add("orange"); 
list2.add("grape"); 
list2.add("pineapple"); 

System.out.println(list2);
[apple, orange, grape, pineapple]
list.addAll(3, list2);
System.out.println(list);
[hi, test, hey, apple, orange, grape, pineapple, hello, nice]

size()

list.size();
9
list2.size();
4

clear()

list2.clear();
System.out.println(list2);
[]

remove(int index)

list.remove(2);
System.out.println(list);
[hi, test, apple, orange, grape, pineapple, hello, nice]

remove(element)

list.add("nice");
System.out.println(list);
[hi, test, apple, orange, grape, pineapple, hello, nice, nice]
list.remove("nice");
true
System.out.println(list);
[hi, test, apple, orange, grape, pineapple, hello, nice]

get(int index)

list.get(3);
// first element is actually the 0th index
orange

set(int index, element)

list.set(4, new String("grapeskittlessuck?"));
System.out.println(list);
[hi, test, apple, orange, grapeskittlessuck?, pineapple, hello, nice]

indexOf(element)

list.indexOf("orange");
3
list.indexOf("thisdoesntexist");
-1

equals(element)

list.equals("doesnt equal");
false

hashCode()

list.hashCode();
-872586150

isEmpty()

list.isEmpty();
false
ArrayList<String> empty = new ArrayList<String>();
empty.isEmpty();
true