Public Sub EqualsObjArr(A() As Object, A2() As Object) As Boolean
Dim JO As JavaObject
JO.InitializeStatic("java.util.Arrays")
Return JO.RunMethod("equals",Array As Object(A, A2))
End Sub
Array1 = Array2 set's the arrays to look at the same array, therefore array1 = array2 will always be true. If you change array1, array2 will change as well.
You can use java.util.Arrays with JavaObject to do the comparison:
B4X:Public Sub EqualsObjArr(A() As Object, A2() As Object) As Boolean Dim JO As JavaObject JO.InitializeStatic("java.util.Arrays") Return JO.RunMethod("equals",Array As Object(A, A2)) End Sub
Other types can of array be compared as well as object(), take a look at the documentation: http://developer.android.com/reference/java/util/Arrays.html