How large, in bytes, is a boxed primitive like java.lang.Integer or java.lang.Character in Java?
An int is 4 bytes, a typical
One very small addition for these answers is that there is some deduplication happening for boxed primitives. For example, Integer::valueOf(int) uses java.lang.IntegerCache that uses Integer instances with values in range -128..127. So, you have above mentioned sizes for boxed objects, but not each of them would be a separate object.