Skip to content

Instantly share code, notes, and snippets.

@j5ik2o j5ik2o/抽象化.md
Created Jul 3, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.