This is just a part of my code that I have problem troubleshooting.
static int checkConcat(String number) {
TreeSet<Integer> a = new TreeSet<Integer>();
for(int i=0; i<number.length(); i++) {
a.add(Integer.parseInt(number.charAt(i)));
}
}
The error that I'm getting is :
error: incompatible types: char cannot be converted to String
What's wrong with the code, and how can I solve it in this context?