<p>I was reading <em><a href="https://rads.stackoverflow.com/amzn/click/com/1430209879" rel="noreferrer" rel="nofollow noreferrer">More Joel on Software</a></em> when I came across <a href="http://en.wikipedia.org/wiki/Joel_Spolsky" rel="noreferrer">Joel Spolsky</a> saying something about a particular type of programmer knowing the difference between an <code>int</code> and an <code>Integer</code> in Java/C# (Object-Oriented Programming Languages).</p>

<p>So, what is the difference?</p>

In Java,
the 'int' type is a primitive, whereas the 'Integer' type is an object.
In C#,
the 'int' type is the same as
```
System.Int32
```
and is
a value type
(ie more like the java 'int'). An integer (just like any other value types) can be
boxed
("wrapped") into an object.
The differences between objects and primitives are somewhat beyond the scope of this question, but to summarize:
Objects
provide facilities for polymorphism, are passed by reference (or more accurately have references passed by value), and are allocated from the
heap
. Conversely,
primitives
are immutable types that are passed by value and are often allocated from the
stack
.