hashmap - Storing hex values in a map .. java? -
i doing this.. gets stored integer.. how can it?
commandmap = new hashmap();
commandmap.put("set_display", 0xd0);
commandmap.put("read_adc", 0xd1);
commandmap.put("get_param", 0xd2);
commandmap.put("set_param", 0xd3);
commandmap.put("get_iovalue", 0xd4);
commandmap.put("set_iovalue", 0xd5);
decimal, hex, octal , on notations; i.e. different ways of rendering integer in characters. not special kinds of numbers.
so ...
commandmap = new hashmap(); commandmap.put("set_display", 0xd0); int value = commandmap.get("set_display"); system.err.println("0x" + integer.tohexstring(value));
Comments
Post a Comment