Hi, StringBuffer s1 =null; String s2=null; if(s1.equals(s2)) System.out.println("true"); If above code is executed, since s1 is StringBuffer and equals() here allows shallow comparison, it should print true.But , the o/p is NullPointerException.what is the reason? Thanks!
Please create objects before subjecting the references to any operation. ------------------ Come on in !! Drinks are on the house in the Big Moose Saloon !!
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.