public static boolean arraysSame(int[] a1, int[] a2) {
    //compares if 2 arrays have the same value
    if (a1.length != a2.length) {
      return false;
    } else {
      var answer = false;
      for (var i = 0; i < a1.length; i++) {
        if (a1[i] == a2[i]) {
          answer = true;
        } else {
          answer = false;
          break;
        }
      }
      return answer;
    }
  }
@Test
  void arraysSameTest() {
    var arr1 = new int[]{1, 4, 2, 6};
    var arr2 = new int[]{1, 4, 2, 6};
    assertTrue(ArrayUtilityMethods.arraysSame(arr1, arr2));
  }