Autoboxing
suggest changeVersions
Java SE 5 through Java SE 9 (Early Access).
Introduction
Autoboxing is the automatic conversion the Java compiler makes between primitive types and their wrapper classes. For example, int becomes Integer and double becomes Double. The conversion the other way is called unboxing. Collections store references, not primitives, so a primitive is boxed when you put it in a collection.
Remarks
Autoboxing can have performance issues when used frequently in your code.
- http://docs.oracle.com/javase/1.5.0/docs/guide/language/autoboxing.html
- http://stackoverflow.com/questions/6037389/integer-auto-unboxing-and-auto-boxing-gives-performance-issues
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents