Application builds successfully but there is no output
<p>I am continuing to study from the e-book "An introduction to Java Programming". In that e-book, I use this method:</p>

<pre><code>/**
 * This method scans the array of cards in a for loop.
 */
public void getDetialsOfCards() {
    // Declare a local variable.
    MembershipCard card = null;

    // note the use of the instanceof operator
    for (int i = 0; i &lt; noOfCards; i++) {
        if (cards[i] instanceof DvdMembershipCard) {
            card = cards[i];
            System.out.println("This is a DVD card with " + getNoOnLoan()
                    + " DVDs currently on loan.");

        } else if (cards[i] instanceof GameMembershipCard) {

            card = cards[i];
            System.out.println("This is a games card with " +
                    getNoOnLoan() + " CDs currently on loan");

        } else {
            System.out.println("Neither type of card.");

        }
    } // End of for loop.

}
</code></pre>

<p>Here is my main method:</p>

<pre><code>public class CompundIfElsegetDetialsOfCards {

    // private static int noOfCards = 2;
    private static int NoOnLoan;
    private static Object[] cards;

    private static DvdMembershipCard[] dvd = new DvdMembershipCard[6];
    private static GameMembershipCard[] game = new GameMembershipCard[6];
    private static MembershipCard card;

    public static void getDetialsOfCards() {
        // Declare a local variable.

        int noOfCards = 6;

        // note the use of the instanceof operator
        for (int i = 0; i &lt; noOfCards; i++) {
            if (cards[i] instanceof DvdMembershipCard) {
                card.equals(cards[i]);

                System.out.println("This is a DVD card with " + getNoOnLoan()
                        + " DVDs currently on loan.");

            } else if (cards[i] instanceof GameMembershipCard) {
                card.equals(cards[i]);

                System.out.println("This is a games card with " +
                        getNoOnLoan() + " CDs currently on loan");

            } else {
                System.out.println("Neither type of card.");

            }

        } // End of for loop.

    }

    public static void main(String[] args) {
        CompundIfElsegetDetialsOfCards.getDetialsOfCards();
    }

    private static int getNoOnLoan() {

        System.out.println("jumlah Loan ");
        return NoOnLoan;
    }

    private static class MembershipCard {

        public MembershipCard() {

        }
    }

    private int i;

    private static class DvdMembershipCard {
        public DvdMembershipCard() {

        }
    }

    private static class GameMembershipCard {
        public GameMembershipCard() {

        }
    }
}
</code></pre>

<p>The code compiles successfully but there is no output. What I must add to solve this?</p>
