About 151,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

    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. 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. 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, …

  5. 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 …

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

    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), …

  7. java - What is the main difference between primitive type and …

    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 …

  8. java - Best Practices : What to use, wrapper classes or primitive …

    Dec 16, 2012 · In Java we have primitive data types and bunch of wrapper classes for them. My question is that when to use what? I know that when we need to create Collections, we will …

  9. java - how to create wrapper class for any user defined class

    Apr 20, 2011 · Homework? Anyways, do you mean you want the Java program to be creating wrapper classes on-the-fly, at runtime? Or do you mean that as part of the program you're …

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