• + 0 comments

    Java 8:

    public static String pangrams(String s) {
            
            Set<Character> chars = new HashSet<>();
            
            for (char c : s.toLowerCase().toCharArray()) {
                if (c >= 'a' && c <= 'z') {
                    chars.add(c);    
                }
            }
            
            return chars.size() == 26 ? "pangram" : "not pangram";
        }