Let's look at the algorithm:
1) start at 1,1 (x == 1, y == 1)
2) move right once (x++)
3) move to the bottom left (x--, y++) until you've reached the left or bottom side
4) move to the bottom (y++)
5) move to the top right (x++, y--) until you've reached the right or top side
6) go to step 2 until you've reached the last cell
A simple loop would now do the trick. Keep in mind that Java arrays start at 0, not 1, so my values for x and y in step 1 are wrong.