Given a string s, your task is to find the total number of unique characters in a string.
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
HashSetCharacter> hs = new HashSet();
String str = sc.nextLine();
int n = str.length();
for(int i=0;in;i++){ //pick char by char
hs.add(str.charAt(i));
}
System.out.println(hs.size());
}
}