Welcome to the Ranch
Please avoid
tabs for indenting, and use the
code button. I have edited your post partially and you can see how much better it looks. If you use Eclipse (which is probably a bad idea at this beginning stage), you can set options to convert tabs to 4 spaces automatically. You are probably better off using a text editor, however.
I think you will only understand it if you go through it with a pencil and paper. Try this simplified version first, and you will see how a loop runs once.
Once you have worked out how that simpler version prints 3 thrice, you will find it easier to work out how the two loops work.