Answers for "java check string contains uppercase character"

1

java check string contains uppercase character

public boolean containsUpperCaseLetter(String s){
	for(int i=0;i<s.length();i++){
    	if(Character.isUpperCase(s.charAt(i))){
        	return true;
        }
    }
	return false;
}
Posted by: Guest on April-04-2021
1

java check string contains uppercase character

yourString.chars().anyMatch(Character::isUpperCase)
Posted by: Guest on April-04-2021

Code answers related to "java check string contains uppercase character"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language