+ 2
what is true about static constructor ?
1. static constructor can have access modifiers. 2.only public keyword can be used for static constructor accessibility 3.static constructor can not have access modifiers
3 Antworten
+ 7
A static constructor is always called once on start (even before you create an instance of the class)
And afterwards, even if you create an instance of that class a million times, the constructor wont respond at all. (Because static constructors are meant to just 'setup' a class only)
So with that in mind: does it make sense to even place an access modifier to your constructor?
If yes, does it honestly make any difference at all?
and if no, you have your answer :V
+ 1
thanks i've got my answer
+ 1
well explain