Wrapper Classes: Core Java
Wrapper Classes: Core Java
Wrapper Classes: Core Java
WRAPPER
CLASSES
1 http://youtube.com/durgasoftware
Core Java
Wrapper Classes
Collection is an object, it able to store a group of other objects.
In java applications, Collection objects are able to store only objects, they will not store
primitive data.
JAVA has provided 8 no of wrapper classes w.r.t the 8 number of primitive data types.
Note: Java has provided all the wrapper classes in the form of immutable classes.
2 http://youtube.com/durgasoftware
Core Java
b) By using Auto-Unboxing:
Auto-Unboxing was provided by JDK 5.0 version, in this approach no need to use any
predefined methods, simply assign wrapper class reference variables to the respective
primitive variables.
3 http://youtube.com/durgasoftware
Core Java
4 http://youtube.com/durgasoftware
Core Java
5 http://youtube.com/durgasoftware