public static boolean isValidName(String str){
  if (str.startsWith("`") && str.endsWith("`")) {
    return isJavaValidName(str.substring(1,str.length() - 1));
  }
  return isJavaValidName(str) && !keys.contains(str);
}

public static boolean isValidName ( String str ) { if ( str . startsWith ( "`" ) && str . endsWith ( "`" ) ) { return isJavaValidName ( str . substring ( 1 , str . length ( ) - 1 ) ) ; } return isJavaValidName ( str ) && ! keys . contains ( str ) ; }
check whether the given string can be a name
