Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Please go back and fix your original post.
Here is a discussion on why to not use the String class. And how to use strings (null terminated character arrays) in the place of Strings.