Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is autoboxing in java...?

 
Abhijit Kangale
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

What is the meaning of autoboxing in java...?

Thanks & Regards,
ABHIJIT
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 5 Language Features: Autoboxing

Note that simple questions like this can quickly be answered by Google - try searching for "java autoboxing" for more links.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhijit,

I do not mean to sound rude or anything, but I have been noticing you are posting a lot of "what is..." and "how to..." type questions. Of course this would mean you are very keen on learning new stuff. However it might be a good idea to read http://faq.javaranch.com/java/SearchFirst

To get the most out of the Ranch, please do take out time to go through http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I give you simple example. As you know List and when you declare list it add object.



In above code you can see when you declare primitive data type int to add list we have to convert into wrapper class or say object. That is use in Pre java 1.5 or upto java 1.4

but java 1.5 use Auto boxing and automatically convert into object or wrapper class that is called autoboxing.

in java1.5



 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Autoboxing is Java Programming 101 these days. Moving to Beginning Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic