how to compare the Java Byte[] array?

后端 未结 15 2394
囚心锁ツ
囚心锁ツ 2020-12-13 01:17
public class ByteArr {

    public static void main(String[] args){
        Byte[] a = {(byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00};
        Byte[] b = {(byte)0x         


        
15条回答
  •  半阙折子戏
    2020-12-13 01:51

    have you looked at Arrays.equals()?

    Edit: if, as per your comment, the issue is using a byte array as a HashMap key then see this question.

提交回复
热议问题