I would like to compare String input to the char[] List.If a letter inside the string is equal to the char[] List, the count should iterate but it always prints out 0. Thanks!
char[] List={'a','b','c','d'};
int count=0;
for(int i=1;i<List.length-1;i++){
if(input.charAt(i)==List[i]){
count++;
}
}
System.out.println(count);