public boolean containsUpperCaseLetter(String s){ for(int i=0;i<s.length();i++){ if(Character.isUpperCase(s.charAt(i))){ return true; } } return false; }
yourString.chars().anyMatch(Character::isUpperCase)