Home » JAVA Programming » Java Basic » Question
  1. Which of the below is an incorrect annotation with respect to JUnits?
    1. @AfterEach
    2. @Test
    3. @BeforeClass
    4. @Junit
    5. None of these
Correct Option: D

@Test is used to annotate method under test, @BeforeEach and @AfterEach are called before and after each method respectively. @BeforeClass and @AfterClass are called only once for each class.



Your comments will be displayed only after manual approval.