June 2018
Beginner
722 pages
18h 47m
English
These two methods are just thin wrappers around Boolean expressions, obj == null and obj != null:
And here is the demo code:
String object = null;System.out.println(object == null); //prints: trueSystem.out.println(Objects.isNull(object)); //prints: trueSystem.out.println(object != null); //prints: falseSystem.out.println(Objects.nonNull(object)); //prints: false
Read now
Unlock full access