Answer:
Answered below
Step-by-step explanation:
public boolean equals(int[] list1, int[]list2){
int I, j;
int count = 0;
//Loop through both lists using nested loops and increase count if their elements are equal.
for(I = 0; I < list1.length; I++){
for(j=0; j< list2.length;j++){
if(list[I] == list[j]{
count++;
}
}
}
//Check if count is equal to maxCount, return false if not equal otherwise return true.
if(count != maxCount){
return false;
}
return true;
}