Introduction to Wrapper classes in Java | Core Java Online Course
This Core Java Online Course “Introduction to Wrapper classes in Java” is providing clean introduction about what is wrapping in java, availability of wrapper classes in java, what is Boxing and un boxing and much more.
- java is not fully Object Oriented programming language.
- If any language supports ‘primitive types’ referred as partial object oriented programming language.
- Small talk, Ruby are the few examples of Fully object oriented programming language.
- To develop fully object oriented java application, we need to convert primitive data into Objects.
- java.lang package is providing pre-defined classes called “wrapper classes” for these data conversions.
- for every primitive data type, there is a corresponding wrapper class.
- ‘java.lang’ package is called default package in java.
- ‘lang’ package classes available directly into every java application.
- ‘lang’ package classes mostly used by basic java programmers(learners).
Wrapper classes Conversions:
- Wrapper classes mainly used for data conversions.
- The 6 mainly used data conversion in java application stated below.
- Primitive to Object (Boxing)
- Object to Primitive (Un boxing)
- Primitive to String
- String to Primitive
- Object to String
- String to Object