O
Ong Hong Peow
Hi,
I've assumed that byte[] does equals with the content too, it's otherwise.
e.g.
byte[] testA = new byte[4];
testA[0] = 0;
testA[1] = (byte)0xac;
testA[2] = (byte)0xab;
testA[3] = (byte)0xde;
byte[] testB = new byte[4];
testB[0] = 0;
testB[1] = (byte)0xac;
testB[2] = (byte)0xab;
testB[3] = (byte)0xde;
System.out.println( testB.equals( testA ) );
prints "false"
How do you compare byte[]?
memcpy() .. kinda equvilant? ...
Hopefully not writing my own.
Thanks.
I've assumed that byte[] does equals with the content too, it's otherwise.
e.g.
byte[] testA = new byte[4];
testA[0] = 0;
testA[1] = (byte)0xac;
testA[2] = (byte)0xab;
testA[3] = (byte)0xde;
byte[] testB = new byte[4];
testB[0] = 0;
testB[1] = (byte)0xac;
testB[2] = (byte)0xab;
testB[3] = (byte)0xde;
System.out.println( testB.equals( testA ) );
prints "false"
How do you compare byte[]?
memcpy() .. kinda equvilant? ...
Hopefully not writing my own.
Thanks.