About 423,000 results
Open links in new tab
  1. design patterns - What is a wrapper class? - Stack Overflow

    May 20, 2009 · A wrapper class is a class that is used to wrap another class to add a layer of indirection and abstraction between the client and the original class being wrapped.

  2. Java: Why are wrapper classes needed? - Stack Overflow

    Sep 4, 2016 · A wrapper class wraps (encloses) around a data type (can be any primitive data type such as int, char, byte, long) and makes it an object. Here are a few reasons why wrapper classes are …

  3. java - When to use wrapper class and primitive type - Stack Overflow

    Oct 15, 2009 · When I should go for wrapper class over primitive types? Or On what circumstance I should choose between wrapper / Primitive types?

  4. Why are there wrapper classes in Java? - Stack Overflow

    2 Wrapper Class: Java uses primitive types, such as int, char, double to hold the basic data types supported by the language. Sometimes it is required to create an object representation of these …

  5. java - Why we need wrapper class - Stack Overflow

    Dec 20, 2013 · I understand what is a wrapper class, they primitive types (eg: int, double, etc) to objects of their respective class (eg: Integer, Double, etc). But, why we need Wrapper classes, why we …

  6. What is the real difference between primitives and wrapper classes in …

    Aug 7, 2020 · To solve this problem, wrapper classes were created. Now, instead of needing 8 separate implementations of dynamic array (1 for reference types and 7 for primitive types), you could wrap …

  7. Wrapper class in java - Stack Overflow

    Jul 23, 2012 · I think your specific question concerns the Java Primitive Wrapper Classes, which are classes that represent the primitive types (int, double, boolean, byte, and so on) as classes. One of …

  8. java - What is the main difference between primitive type and wrapper ...

    Nov 12, 2012 · In Java, an instance of a primitve class holds the actual value of the instance, but instance of a wrapper class holds a reference to the object. i.e. The address of the place where the …

  9. java - Best Practices : What to use, wrapper classes or primitive data ...

    Dec 16, 2012 · The wrapper classes in the Java API serve two primary purposes: 1- To provide a mechanism to “wrap” primitive values in an object so that the primitives can be included in activities …

  10. 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 to an …