Here is part of my school project. This my first time using the forum.

The specs say, "Set array of InvoiceItem objects into the Invoice with the set method." So my code is:

public class ProcessInvoice {
 
    //  The class will have one instance variable that holds an object of type Invoice.
 
private Invoice banana = new Invoice();
 
 //  Set array of InvoiceItem objects into the Invoice with the set method
 
banana.setItems(InvoiceItem[] items);

The corresponding code in another class is:

//  Create a set method for the array of InvoiceItem objects. 
    //  This will take an array of type InvoiceItem and assign it to the instance variable.
    public void setItems(InvoiceItem[] items)   {
        this.items = items;

Here are my error messages after trying to compile the class:

E:\projects>javac -classpath src\java111\project2 src\java111\project2\ProcessInvoice.java
src\java111\project2\ProcessInvoice.java:25: '.class' expected
banana.setItems(InvoiceItem[] items);
^
src\java111\project2\ProcessInvoice.java:25: ';' expected
banana.setItems(InvoiceItem[] items);
^