For this Question: Given a string, your task is to calculate the number of different characters in that string.The first line of the input contains length of string. Second line contains String.

Constraints
1 <= string length <= 100
String contains only lowercase english lettersOutput a single integer which is the number of different character in the string.Sample Input
3
abc

Sample Output
3

Sample Input
7
asbscsb

Sample Output
4, I have written this Solution Code: import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
int cnt=0;
int p =0;
for(char ch = 'a';ch<='z';ch++){
p=0;
for(int i = 0;i<n;i++){
if(s.charAt(i)==ch){p=1;}
}
if(p==1){cnt++;}
   }
   System.out.println(cnt);


	    

}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?