hi guys, i tried this below code
String left=null;
if (left.equals("Kumar"))
System.out.println("Checked");
if ("kumar".equals(left))
System.out.println("Checked");
In the first if condition i am getting nullpointer exception. Can you please tell me why this error occurs.