private static boolean isValidMethodName(String methodName){
  return methodName.matches("^[a-zA-Z_$][a-zA-Z0-9_$]*$");
}

private static boolean isValidMethodName ( String methodName ) { return methodName . matches ( "^[a-zA-Z_$][a-zA-Z0-9_$]*$" ) ; }
determine whether the provided method name is valid in java .
