what is execution order of TestNG?

Parent class has @BeforeClass. Child class has @BeforeClass and @Test. What is an execution order?
What is execution order if @BeforeClass methods’ names in both classes are the same?


First @BeforeClass in parent class is executed, then @BeforeClass in child class.
If @BeforeClass name is the same in parent and child class, then you are just overriding the method so only child class @BeforeClass is executed.

Source: stackoverflow