I am writing some test cases using JUnit. I need to initialize some static variables which will be used for all the test cases in that class.
For this I can use either
- Static initializer block or
- Static method with
@BeforeClass
What are the advantages of using one over another?