// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.util.ArrayList;
import java.util.List;

public class SeqCol20 {
    public static void main(String[] args) {
        List<Integer> lst = new ArrayList(List.of(1, 2, 3));
        lst.remove(0);
        lst.add(4);
        System.out.printf("lst : %d .. %d\n", lst.get(0), lst.get(lst.size() - 1));
    }
}

