I'm not sure what you are trying to do.
What would be the results of comparing:
char[] someChars = {' ','r',' ','e'};
with
String str = "tree";

Are you looking for words that are 4 chars long...