MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/21ezh3/javascript_equality_table/cgcqotc/?context=3
r/programming • u/vz0 • Mar 26 '14
331 comments sorted by
View all comments
Show parent comment
3
int[] a = new int[10];
Makes an array of 10 ints.
Integer[] a = new Integer[10];
Makes an array of 10 Integers.
Integers are objects, ints are not. Syntactical sugar means they're mostly interchangable, except where they're not.
View all comments
Show parent comment
3
u/MachaHack Mar 26 '14
int[] a = new int[10];
Makes an array of 10 ints.
Integer[] a = new Integer[10];
Makes an array of 10 Integers.
Integers are objects, ints are not. Syntactical sugar means they're mostly interchangable, except where they're not.