Answer:
4
Explanation:
ArrayList bulbs = new ArrayList();
bulbs.add(new Light()); // bulbs array length equal to 1
bulbs.remove(0); // bulbs array length equal to 0
bulbs.add(new Light()); // bulbs array length equal to 1
Light b = new Light();
bulbs.add(1, b); // bulbs array length equal to 2
bulbs.add(new Light()); // bulbs array length equal to 3
bulbs.remove(0); // bulbs array length equal to 2
bulbs.add(new Light()); // bulbs array length equal to 3
bulbs.remove(2); // bulbs array length equal to 2
bulbs.add(new Light()); // bulbs array length equal to 3
bulbs.add(1, new Light()); // bulbs array length equal to 4