Question: what is the difference between junit 3 and 4?
Answer: In JUnit 3. x, we have to override theÂ setUp() Â andÂ tearDown() Â methods. Â But in,JUnit 4. x, it is based on annotations, it would not require to extend any particular methods, useÂ @Before and @After Â to annotate the methods which needs execution right before/after each of the tests.