What is the output of the following Java program?
class Visitor {
static int count = 0;
final int id;
Visitor() { count++; id = count * 100; }
}
public class Main {
public static void main(String[] args) {
Visitor a = new Visitor();
Visitor b = new Visitor();
new Visitor();
System.out.println(a.id + " " + b.id + " " + Visitor.count);
}
}
The constructor runs once for each new, even when the object is not stored.