This line:
if (word.charAt(charactercount) == " "){
is using ==
to compare 2 different things, left is a char, and right is a String. So they can't be equal even if they're both spaces. The char version of a space looks like ' '
.
There's other problems which will stop that code from working, but that's the one you're asking about at the moment.