Skip to content

Instantly share code, notes, and snippets.

@j5ik2o
Created July 3, 2019 04:49
Show Gist options
  • Save j5ik2o/bd90d7049cd6b05452755cf16dc30b8d to your computer and use it in GitHub Desktop.
Save j5ik2o/bd90d7049cd6b05452755cf16dc30b8d to your computer and use it in GitHub Desktop.
public static boolean isNameHashUpperCase(String name) {
  boolean result = false;
  for (int i = 0; i < name.length; i++) {
    if (Character.isUpperCase(name.charAt(i)) {
      result = true;
      break;
    }
  }
  return result;
}
def isNameHashUpperCase(name: String): Boolean = name.exists(_.isUpper)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment