1
Reply

Assume that a class, Class1, has both instance and static constructors. Given the code below, how many times will the static and instance constructors fire?

    Class1 c1 = new Class1(); Class1 c2 = new Class1(); Class1 c3 = new Class1();By definition, a static constructor is fired only once when the class is loaded. An instance constructor on the other hand is fired each time the class is instantiated. So, in the code given above, the static constructor will fire once and the instance constructor will fire three times.