You cannot call an instance function without an instance reference. In this case just make it static. You also need to return a value at the end of the function. It would also be better to test
every element of the arrays:
static boolean func(int arr[], int arr2[], int size) {
boolean array_equal = true;
int sizeArr = size;
for (int k = 0; k < sizeArr; k++) {
if (arr[k] != arr2[k]) {
array_equal = false;
break;
}
}
return array_equal;
}