private static boolean equalsMayBeNullOrZeroLen(String s1,String s2){
  int len1=(s1 == null) ? 0 : s1.length();
  int len2=(s2 == null) ? 0 : s2.length();
  return (len1 != len2) ? false : (len1 == 0) ? true : s1.equals(s2);
}

private static boolean equalsMayBeNullOrZeroLen ( String s1 , String s2 ) { int len1 = ( s1 == null ) ? 0 : s1 . length ( ) ; int len2 = ( s2 == null ) ? 0 : s2 . length ( ) ; return ( len1 != len2 ) ? false : ( len1 == 0 ) ? true : s1 . equals ( s2 ) ; }
tell if the two string refs are equal , equality being defined as : 1 ) both strings are null . 2 ) one string is null and the other is empty . 3 ) both strings are non - null , and equal .
