+1 vote
in JAVA by
Which one will take more memory, an int or Integer?

1 Answer

0 votes
by
An Integer object will take more memory an Integer is the an object and it  store meta data overhead about the object and int is primitive type so its takes less space.

Related questions

0 votes
asked Sep 12, 2022 in Scala Constructs by Robin
0 votes
asked Oct 18, 2020 in JAVA by sharadyadav1986
...