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

    May 20, 2009 · Wrapper class is a wrapper around a primitive data type. It represents primitive data types in their corresponding class instances e.g. a boolean data type can be represented …

  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 …

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

  4. 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?

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

  6. Why are Java wrapper classes immutable? - Stack Overflow

    This is the case with pass by reference of wrapper class parameters as well. And, if strings and wrapper classes are non-final, anybody can extend those classes and write their own code to …

  7. Using == operator in Java to compare wrapper objects

    When the Java == operator is used to compare anything other than primitive types, it checks for referential equality; this applies even when the things being compared are wrapped primitives.

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

  9. Default value of 'boolean' and 'Boolean' in Java - Stack Overflow

    Jun 3, 2011 · What are the default values of boolean (primitive) and Boolean (primitive wrapper) in Java?

  10. java - Can we call String as a wrapper class? - Stack Overflow

    Jul 6, 2011 · 13 Wrapper classes are used to "wrap" the primitives data types into objects so that they can be included in the activities which are reseved for the objects. String class wraps the …