null in JAVA

null & NullPointerException in Java 9

What is null ? null in JAVA is a literal and in JAVA keywords are case sensitive. So, we don’t write Java null as NULL or Null. [sourcecode language=”java”] public class Sample { public static void main(String[] a) throws java.lang.Exception { //Compile-time error: can’t find symbol ‘NULL’ Object ob = NULL; //Executed successfully Object ob[…]