Answers for "java 11 check object null"

1

check if an object is null java

// simple test

String name = null;

if(name != null)
  System.out.printf("Hello Mr.%s\n", name);
else
  System.err.println("error, name == null");
Posted by: Guest on August-03-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language