Java Development Nested For Loop

hello, all

I need help understanding the logic of this nested for loop. It's pretty simple and I understand most for loop implementations but for the gods of me I can't understand why one would need to do this (the underlined section)... 

public Deck() {
          cards = new Card[numSuits][numRanks];
          for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++) {
                for (int rank = Card.ACE; rank <= Card.KING; rank++) {
                      cards[suit-1][rank-1] = new Card(rank, suit);
                }
          }
}

So, to give a heads up, this is a constructor for the class Deck. Each instance of the class creates a whole deck of 52 cards including all four suites. If you need more information before you can help me, just ask and I can tell you the other classes required for this to actually work. But, what I need help understanding again, is the card[suit-1][rank-1] part. From what I notice is that every time a new card is created (as an instance of Class Card) it passes the arguments of suit -1 and rank -1. I do understand that whenever an instance of Deck class is created, it goes through like this.... 1,1 .. 1,2 .. 1,3 .. 1,4 .. 1,5 .. 1,6 .. 1,7 .. 1,8 .. 1,9 .. 1,10 .. 1,11 .. 1,12 .. 1,13 .. 1,14 .. 2,1 ........

or in words... one of diamonds, two of diamonds, three of diamonds, four of diamonds, five of diamonds.....

Hopefully this is enough information for someone to help. If not, just ask. Thanks!!!

You've answered your own question mate - starts with x suit, goes to inner loop creates 14 cards of that suit, then goes to outer loop again to start again with the next suit.