Assertions

© examsiri.com
Question : 2 of 6
 
Marks: +1, -0
Given a method that must ensure that its parameter is not null:
1. public void someMethod(Object value) {
2.   /*check for null value*/
...
3.   System.out.println(value.getClass());
4. }

What, inserted at line 2, is the appropriate way to handle a null value?
Go to Question: