How can I pass a variable of type array as a parameter in an instantiated object
I have this on the Main.java Class:
String [] itemList;
Magazine magazine1 = new Magazine(nMagazine, itemList[], distributionPrice, pvp);
This the Magazine.java Class
public class Magazine extends Publication {
private int numberMagazine;
private String[] itemList;
public Magazine(int numberMagazine, String[] itemList, float distributionPrice, float pvp) {
super(distributionPrice, pvp);
this.numberMagazin = numberMagazin;
this.itemList = itemList;
}
In the main class when I instantiate the magazine1 object I can't call the itemList[] variable and I don't understand why