I read that you can pass an array as a parameter to a method but is it recommended? What i mean is, is there any other way of doing it that would be more accepted?
In my case, i have 2 classes that each contains an array and i need to check if both of them are the same or are different. So i thought of creating a method in one of the class that would take an array in parameter and then compare every value of the two arrays.
I am not sure if Arrays.equals():
works since it's an object array and not just numbers.
I found this Java Array Comparison but it seems to be more complicated than what i need to do.