+ 1
Can anyone explain me which one will take more memory int or Integer and why?
2 Answers
+ 2
In Java, int is a primitive data type while Integer is a Wrapper class.
We cant compare both on the basis of memory still integer will consume more as non static method consumes more.