How do I do the == operator here?
Also I need help, I have a list array here that I want to add the location of any whitespaces in my array
length is just a varaible that holds length of word
for (int i = 0; i<length; i++) {
if (word.charAt(i)) == (' '){
whitespaces_array.add(i);
}