it's homework. Same question pops up on Sun's (and other) forums with clockwork regularity every few months (just about the length of an introductory Java course).
Expect questions about printing a diamond of asterisks in a week or two, when the next group learns about loops.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.