Q1.What is JUnit?
Interviewers open with "JUnit" to confirm you can define the concept in one crisp line before going deeper. In JUnit rounds this filters out candidates who only remember syntax and can't articulate the underlying idea to a non-expert teammate.
JUnit is the de-facto Java unit testing framework. JUnit 5 (aka Jupiter) is the 2026 default — modular architecture, native parameterized tests, dynamic tests, and rich extension model.
- Open with a one-sentence definition of JUnit, then a concrete JUnit example — never start with history or theory.
- Keep the answer to 60–90 seconds; anything longer signals you can't summarise JUnit cleanly.
- Reference JUnit 5 features (parameterized, nested) explicitly to signal you're not stuck on JUnit 4.