Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fundamental Question about int vs Integer

807607Jan 23 2007 — edited Jan 23 2007
I don't really understand what the difference is between using the "int" keyword and using the Integer type. I've come to realise that "int" cannot be null whereas Integer can be null but why isn't int just an Integer type? Like an alias of sorts. I realise this a fairly basic question but I'm sure I'm not the only one pondering this :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2007
Added on Jan 23 2007
37 comments
728 views