Is a Java static block equivalent to a C3 static constructor?

Posted by Mackenzie on Stack Overflow See other posts from Stack Overflow or by Mackenzie
Published on 2010-03-17T19:30:10Z Indexed on 2010/03/17 19:31 UTC
Read the original article Hit count: 418

What is the real difference between a C# static constructor and a Java static block?

They both must be parameterless. They are both called only once, when the related class is first used.

Am I missing something, or are they the same thing, just with different names?

© Stack Overflow or respective owner

Related posts about static-constructor

Related posts about c#