Код: Выделить всё
public static void main(String[] args) {
final byte key = 0;
Map test = new HashMap();
test.put(0, 10);
System.out.println(test.containsKey(key));
}
Код: Выделить всё
System.out.println(test.containsKey((int)key));
Подробнее здесь: https://stackoverflow.com/questions/792 ... ontainskey
Мобильная версия