What is the diff between int and Integer in terms of array
I'm newbie to Java.
Could anyone pls tell me the diff between int and Integer in terms of Array.
int iarray = new int;
Integer iarray = new Interger;
I know that , first one is primitive and second one is class.
The second one requires 80 bytes of memory in order to complete the task, as it stores the reference in the array.
Want to know abt the first one , will it behave same as Integer ?
If I want to store 20 integer value , then which one is best WRT performance?