Answered Questions

  • Constructors can not be static ?


    • Mar 25th, 2012

    Yes, there can be a static constructor. It will be at class level & executed just once. It is totally in run-times control & not sure of when this will be executed. But, it is assured that it will be executed before creating instance of the class.

    Aashish Chachra

    • Mar 2nd, 2012

    A class can have only one static constructor. Static constructor can not have any parameter. Static constructor cannot have any access specifier, not even private. It is used to initialize the static ...