java - How can I get the byte value in a Map -
this question has answer here:
i value of byte inside map object.
map<string, object> data = new hashmap<>(); data.put("foo", new byte[]{4}); system.out.println(data.get("foo"));
what i'm getting this... [b@1a779dce
please me.
as adding object
map not byte[]
need cast it.
map<string, object> data = new hashmap<>(); data.put("foo", new byte[]{4,3,1,2}); system.out.println(arrays.tostring((byte[])data.get("foo")));
output
[4,3,1,2]
Comments
Post a Comment