"The type of the expression must be an array type but it resolved to..."
I have a Customer class.
I have a CustomerDataHelper class that has a method that creates a Customer[][] , populates it with 10 Customers and returns it.
publicstatic Customer[] getCustomerData(){
returnnew Customer[]{
new Customer(10 ,"Hoertz","Richard","123 Main St.","San Antonio",
"TX","78230"),
new Customer(20,"Smith","John","258 Austin Blvd","Austin",
"TX","78501"),
...
}
In main I'm calling the method in CustomerDataHelper, getCustomerData, and populating Customer[] cst.
publicstaticvoid main(String[] args){
Customer[] cst = getCustomerData();
for(int i = 0; i < cst.length; i++){
int j = 0;
if (cst[i][j]== 20 || cst[i][j] == 50 || cst[i][j]== 80
|| cst[i][j]==100)
System.out.println(cst[i]);
j++;
}
My problem is my if statement, it gives me the error message listed in my Subject line for each cst[][]. It resolves it just fine in the for statement and the stdout statement, but not the if statement.
Can someone please explain?

