Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java require non null

// If you need to force the object not to be null
Objects.requireNonNull( whatever )

// i.e

public void add(Animal animal) {
		Objects.requireNonNull(animal)
		zoo.add(animal);
}
 
PREVIOUS NEXT
Tagged: #java #require #null
ADD COMMENT
Topic
Name
1+7 =