This is not working (Throwing Nullpointer Exception)
String s = null;
System.out.println(s);
System.out.println(String.valueOf(null));
But this is
String s = null;
System.out.println(s);
System.out.println(String.valueOf(s));
why ?? unable to getting. I want understand logic behind.