import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
ArrayList<Integer> lista = new ArrayList<>();
lista.add(432);
lista.add(23);
lista.add(18);
lista.add(2);
lista.add(100);
System.
out.
println("Antes: " + lista
); System.
out.
println("Depois: " + lista
); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUFycmF5TGlzdDxJbnRlZ2VyPiBsaXN0YSA9IG5ldyBBcnJheUxpc3Q8PigpOwogICAgICAgIGxpc3RhLmFkZCg0MzIpOwogICAgICAgIGxpc3RhLmFkZCgyMyk7CiAgICAgICAgbGlzdGEuYWRkKDE4KTsKICAgICAgICBsaXN0YS5hZGQoMik7CiAgICAgICAgbGlzdGEuYWRkKDEwMCk7CiAgICAgICAgCiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJBbnRlczogIiArIGxpc3RhKTsKICAgICAgICBDb2xsZWN0aW9ucy5zb3J0KGxpc3RhLCBDb2xsZWN0aW9ucy5yZXZlcnNlT3JkZXIoKSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJEZXBvaXM6ICIgKyBsaXN0YSk7Cgl9Cn0=
Antes: [432, 23, 18, 2, 100]
Depois: [432, 100, 23, 18, 2]