Quick actions

cmd+k|ctrl+k

Navigation

Languages

Pangram

Snippet info

Language

Java

Visibility

public

Author

yudhistiraaaa20

Created

2025-01-13T09:44:37.899108Z

Updated

2025-01-13T09:44:37.899108Z

import java.util.*;

class Main {
    public static void main(String[] args) {
        String question = "We promptly judged antique ivory buckles for the next prize";
        String toLower = question.toLowerCase();
        boolean allLetterPresent = true;
        for(char ch = 'a'; ch <= 'z'; ch++){
            if(!toLower.contains(String.valueOf(ch))){
                allLetterPresent = false;
            }
        }
        
        if(allLetterPresent){
            System.out.println("pangram");
        }else{
            System.out.println("not pangram");
        }
    }
}
INFO