public static boolean isSnakeCase(String name){
  return Pattern.matches("[\\da-z_]+",name);
}

public static boolean isSnakeCase ( String name ) { return Pattern . matches ( "[\\da-z_]+" , name ) ; }
checks if given name is a snake - cased name i . e if the name contains all small - caps and underscores only
