ok sorry to Ernest...
and to Pete,
I have no idea how to do that whole ubb thing. I am using Eclipse and i didnt see anything that said ubb in edit.
the extra whitespaces in my input code are missing but they dont matter. they can be anywhere. I just cant figure out how to get rid of more than one between each word. It should read just like in the output. I tried using the "trim()" method but that had no effect. I think i need to read the words by themselves and then call "trim" but i cant figure out how to do this. Im new to this stuff and its kicking my rear

I also looked in my book for string commands and trim was the only promising one in there that i noticed.
thanks for your help...i hope this will further help you help me! lol thanks again