public static boolean equals(String a,String b){
  if (a == null) {
    return b == null;
  }
  return a.equals(b);
}

public static boolean equals ( String a , String b ) { if ( a == null ) { return b == null ; } return a . equals ( b ) ; }
check if two strings are equal . here , null is equal to null .
