Exception in thread "main" java.lang.NoSuchMethodError: main - code
<p>Here is the source code for the program I wrote.</p>

<pre><code>public class DVDInventoryProgram {
    final int MAX = 5;
    DVDsList dt[] = new DVDsList[MAX];
    int numberOfDVDs = 0;

    public void arraySort(int count) {
        int pass, i;
        int temp;
        DVDsList s = null;

        if (count &gt; 1) {
            for (pass = 1; pass &lt; count; pass++) {
                for (i = 0; i &lt; count - pass; i++) {
                    temp = (dt[i].getName()).compareTo(dt[i + 1].getName());

                    if (temp &gt; 0) {
                        s = dt[i];
                        dt[i] = dt[i + 1];
                        dt[i + 1] = s;
                    }
                }
            }
        }
    }

    public float totalValueOfInventory() {
        float inventoryValue = 0;

        for (int i = 0; i &lt; numberOfDVDs; i++) {
            inventoryValue = inventoryValue + dt[i].getInventoryValue();
        }

        return inventoryValue;
    }

    public void displayDVD(int index) {
        System.out.println("Name:                   " + dt[index].getName());
        System.out.println("ID:                     " + dt[index].getProductID());
        System.out.println("Unit Price:             " + dt[index].getUnitPrice());
        System.out.println("Units in Stock:         " + dt[index].getUnitsInStock());
        System.out.println("Total Product Value:    " + dt[index].getInventoryValue());
        System.out.println("Director:               " + dt[index].getDirector());
        System.out.println("Restocking Fee:         " + dt[index].getRestockFee());
        System.out.println("\nTotal Value of Inventory: " + totalValueOfInventory());
        System.out.println();
    }

    public static void main(String args[]) {
        String name;
        int number;
        long stock;
        float price;
        String director;

        DVDinventoryProgram dip = new DVDinventoryProgram();

        Scanner input = new Scanner(System.in);

        System.out.println();
        System.out.println("&lt;&lt;&lt;DVD Inventory Program&gt;&gt;&gt;");
        System.out.println();

        DVDsList dvd;

        while (true) {
            System.out.println();
            System.out.print("Enter a DVD Title(or STOP to End Program): ");
            name = input.nextLine();

            if (name.equalsIgnoreCase("stop")) {
                break;
            }

            System.out.print("Enter a Product ID: ");
            number = input.nextInt();

            System.out.print("Enter the Unit Price: ");
            price = input.nextFloat();

            System.out.print("Enter the Number of Units in Stock: ");
            stock = input.nextLong();

            input.nextLine();

            System.out.print("Enter the Name of the Director: ");
            director = input.nextLine();

            dvd = new DVDsList(name, number, price, stock, director);

            if (dip.numberOfDVDs &lt; dip.MAX) {
                dip.dt[dip.numberOfDVDs] = dvd;
                dip.numberOfDVDs++;
                System.out.println();
                System.out.println("&lt;&lt;&lt; NEW DVD &gt;&gt;&gt;");
                dip.displayDVD(dip.numberOfDVDs - 1);
            } else {
                System.out.println("\nArray is full. Please stop entering information.");
            }

        }

        dip.arraySort(dip.numberOfDVDs);

        System.out.println("\n&lt;&lt;&lt; DVD LIST BY NAME &gt;&gt;&gt;\n");

        for (int i = 0; i &lt; dip.numberOfDVDs; i++) {
            dip.displayDVD(i);
        }

        System.out.println();
        System.out.println("End of Program.");
        System.out.println();
    }
}
</code></pre>
