1.

Which of the below is an incorrect annotation with respect to JUnits?(a) @Test(b) @BeforeClass(c) @Junit(d) @AfterEachThe question was asked in quiz.My question is from JUnits topic in chapter Autoboxing & Miscellaneous of Java

Answer»

The correct OPTION is (c) @Junit

Best explanation: @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.



Discussion

No Comment Found

Related InterviewSolutions