java - Code to tell whether a string is a Pangram or not? -
import java.io.*; import java.util.*; public class solution { public static final int n = 26; public int check(string arr){ // int count = 0; if(arr.length() < n){ return -1; } for(char c = 'a'; c <= 'z' ; c++){ if((arr.indexof(c) < 0) && (arr.indexof((char)(c + 32)) < 0)){ return -1; } } return 1; } public static void main(string[] args) { scanner s1 = new scanner(system.in); string s = s1.next(); solution obj = new solution(); int d = obj.check(s); if(d == -1) system.out.print("not pangram"); else system.out.print("pangram"); } } if string entered : "we promptly judged antique ivory buckles next prize" gives wrong output " not pangram" m not able find out wrong code thanx in advance ! the pro