Skip to content

Instantly share code, notes, and snippets.

@hoangbits
Created September 29, 2022 04:07
Show Gist options
  • Save hoangbits/3b7eb6389410d28c09fc8c9fce02064e to your computer and use it in GitHub Desktop.
Save hoangbits/3b7eb6389410d28c09fc8c9fce02064e to your computer and use it in GitHub Desktop.
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
class Main {
public static void main(String[] args) {
String str = "gEeks";
// String str = "Geeks";
Boolean isNameUpper = Character.isUpperCase(str.charAt(1));
System.out.println(isNameUpper); // true
Boolean isNameUpper2 = Character.isUpperCase('E');
System.out.println(isNameUpper2); // true
Boolean isNameUpper3 = Character.isUpperCase('e');
System.out.println(isNameUpper3); // false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment