Home »
MCQs »
JUnit MCQs
Which of the following checks if the object is NOT NULL?
20. Which of the following checks if the object is NOT NULL?
- void assertNotNull(Object obj)
- void assertNull(Object obj)
- void assertNullNot(Object obj)
- void assertNullValue(Object obj)
Answer: A) void assertNotNull(Object obj)
Explanation:
void assertNotNull(Object obj) checks if the object is NOT NULL.