About 939,000 results
Open links in new tab
  1. Why do we use autoboxing and unboxing in Java? - Stack Overflow

    Dec 25, 2014 · Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int …

  2. autoboxing - How does auto boxing/unboxing work in Java

    Since JDK 5.0, auto boxing/unboxing was introduced in Java. The trick is simple and helpful, but when I started testing different conversions between wrapper classes and primitive types, I get …

  3. What is the difference between Boxing and AutoBoxing in Java?

    Nov 24, 2015 · What is the difference between Boxing and AutoBoxing in Java? Several Java Certification books use two such terms. Do they refer to the same thing that is Boxing?

  4. Java: What's the difference between autoboxing and casting?

    Sep 10, 2013 · Autoboxing or autounboxing happens when the compiler does the boxing/unboxing conversion for you (it doesn't explicitly appear in the source code as a cast …

  5. java - autoboxing and generics - Stack Overflow

    Feb 23, 2017 · Java 5.0 introduced automatic conversion between a primitive type and the corresponding wrapper class. From primitive type to it corresponse wrapper class is called …

  6. Autoboxing in Java - Stack Overflow

    Dec 13, 2011 · So when should you use autoboxing and unboxing? Use them only when there is an “impedance mismatch” between reference types and primitives, for example, when you …

  7. Should autoboxing be avoided in Java? - Stack Overflow

    Sep 30, 2011 · This is what Java Notes says on autoboxing: Prefer primitive types Use the primitive types where there is no need for objects for two reasons. Primitive types may be a lot …

  8. java - When using == for a primitive and a boxed value, is …

    May 26, 2015 · When two primitive values are compared using == operator autoboxing does not take place. When two objects are compared using == operator autoboxing plays role. When …

  9. primitive types - Autoboxing for String in java - Stack Overflow

    Feb 1, 2020 · Any value in quotes in java is treated as a String, and strings are objects, Auto-boxing is not supported in JAVA for Objects, So If you need then you have to do explicitly. …

  10. java - Booleans, conditional operators and autoboxing - Stack …

    Oct 7, 2010 · E1: `true ? returnsNull() : false` - boolean (auto-unboxing 2nd operand to boolean) E2: `true ? null : false` - Boolean (autoboxing of 3rd operand to Boolean) See Java Language …