Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why we can't use byte[] as a key of hashmap?

user-image
Question added by Deleted user
Date Posted: 2013/10/18
Mohamed Amer
by Mohamed Amer , Software Development Engineering at TradeNet , TradeNet

becuase byte[] uses equals and hashCode to compare, so that

byte[] a = {1,2,3};

byte[] b = {1,2,3};

will not match in hashmap

More Questions Like This