public class Bird { private static int id = 0; private String kind; public Bird(String requiredKind) { id = id + 1; kind = requiredKind; } public S
static variables are shared across objects unlike instance variables. So when this executes
birds[0] = new Bird("falcon");
the id increments to 1. After that the below is executed incrementing it to 2
id
birds[1] = new Bird("eagle");