Skip to Main Content

New to Java

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Integer versus int

843785Oct 7 2008 — edited Oct 7 2008
what is the difference between Integer and int, I know that you can do Integer.toString () but not int.toString (). is this the only difference? and is this the only way to convert an int/Integer to a String? are Integer and int values compatible? for example could you:
int num = 1;
Integer num2 = num;
Want to see if this is why my program is giving errors...im returning an int value and putting it into an Integer variable
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2008
Added on Oct 7 2008
10 comments
1,634 views