Is it possible to check if two arrays are not equal

前端 未结 4 1209
别跟我提以往
别跟我提以往 2021-01-06 23:48

I\'m aware of the fact that I could just do a:

while(Arrays.equals(array1, array2))

and then just write the code needed in the else

4条回答
  •  -上瘾入骨i
    2021-01-07 00:20

    How about

    if (!Arrays.equals(array1, array2))
    

    Or is that what you mean in your example?

提交回复
热议问题