Compare two Byte Arrays? (Java)

前端 未结 6 1237
天涯浪人
天涯浪人 2020-12-08 01:46

I have a byte array with a ~known binary sequence in it. I need to confirm that the binary sequence is what it\'s supposed to be. I have tried .equals in additi

6条回答
  •  无人及你
    2020-12-08 02:17

    Java doesn't overload operators, so you'll usually need a method for non-basic types. Try the Arrays.equals() method.

提交回复
热议问题