Possible Duplicate:
Why can Integer and int be used interchangably?
I am trying to understand the difference between these. Can I declare something to be an int for example and then compare this with a number that I put in an Integer? Also why does Java have the two. Why not just combine these?
Can someone help me by showing me a 3-4 line code example of how each is used?