I\'m using a HashMap: byte[] key and String value. But I realize that even I put the same object (same byte array and same string value) by using
myList.put(
You can use ByteBuffer, which is a wrapper for byte[] array with a comparator.
ByteBuffer
Referring answer from - https://stackoverflow.com/a/14087243/4019660