Originally Posted by
kl2eativ
... the professor never mentioned anything about pencil and paper.
The idea is that you figure out how you're going to solve the problem before writing any code. If he didn't tell you that, he should have.
Even just summarizing the requirement would be useful:
Take a String
Loop until the String length is 0
In the loop:
remove a character from the end of the String
print the new String length and the String contents
The code you posted originally had three 'for' loops, when the requirement was for one...
I did that because I guess thats what he wants? Maybe I am wrong, Here are the instructions :
At the main method, create a single dimension array containing your
"first name $ middle name % last name and ONE space"
i.e. "George & Washington % Rodriguez "
OK, although it's not entirely clear why he wants a String array here - arrays usually store multiple elements...