void main() {
    ArrayList<Integer> a = new ArrayList<>(List.of(1, 2, 3));
    ArrayList<Integer> b = a;
    b.add(4);
    IO.println(a);

    ArrayList<Integer> c = new ArrayList<>(List.of(1, 2, 3));
    ArrayList<Integer> d = new ArrayList<>(c);
    d.add(4);
    IO.println(c);
}

// From Groundwork, chapter 7 (ch07-arrays-and-lists), box 21.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch07_21.java
