public static boolean prefixedWith(String a,String b){
  if (a.equals(b)) {
    return false;
  }
  return a.startsWith(b);
}

public static boolean prefixedWith ( String a , String b ) { if ( a . equals ( b ) ) { return false ; } return a . startsWith ( b ) ; }
return true of both a and b are non - null , and b is a prefix ( but not equal to ) a .
