Double d1 = null;
Double d2 = null;
System.out.println(d1+d2);//throw NullPointerException
String s1 = null;
String s2 = null;
System.out.println(s1+s2);//doesn't throw any exception prints nullnull
Since both Double and String are of type Object then why Double types throw exception??