3 ms·
Last I checked, if you store an int in a generic it get's converted to an object which takes more memory to store. So, the syntax is similar, but the actual be
by Retric 9y ago
Last I checked, if you store an int in a generic it get's converted to an object which takes more memory to store.
So, the syntax is similar, but the actual behavior is not because int's can't be null, but Integers can for example.
This costs 8 ish bytes of memory.
- foota 9y agoThat is true. It looks like there is some work being done to potentially relax this constraint, http://openjdk.java.net/jeps/218 http://openjdk.java.net/jeps/218