Which is the best method to convert Currently I am using something like below
List<Byte> bytes = new ArrayList<Byte>();
List<Object> integers = Arrays.asList(bytes.toArray());
Then each object inside integers needs to be typecast to Integer. Is there any other way in which I can achieve this?
With the standard JDK, here’s how to do it
If you’re sure, you don’t have any
nullvalues inbytes: