Java tutorial
import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<Integer> a = new ArrayList<>(); a.add(1); a.add(5); a.add(1); a.set(1, null); System.out.println(a.get(1)); System.out.println(a); } }