how to declare list of object in java as constant

Java
public static final List<String> list = Collections.unmodifiableList(
    new ArrayList<String>() {{
        add("foo");
        add("bar");
        // etc
    }});

Source

Also in Java: