Data Type Java Tutorial

public class MainClass {
  public static void main(String[] arg) {
    String s = null;
    
    System.out.println(s.length());
  }
}
Exception in thread "main" java.lang.NullPointerException
at MainClass.main(MainClass.java:6)