Skip to main content

Posts

Showing posts from August, 2017

Wrapper class ,auto boxing and unboxing in Java

#Topic-6 Previous topic (5) we have discussed about Variables and Data Types in Java, we have gone through various data types and literals. If you have not gone through that topic, click this link What are the Variables and Data types using in Java? In this section we will discuss about Wrapper class, auto-boxing, UN-boxing and many more! Wrapper class in Java Each of Java's eight primitive data types has a class dedicated to it. These are known as wrapper classes because they "wrap" the primitive data type into an object of that class. The wrapper classes are part of the java.lang package, which is imported by default into all Java programs.  Wrapper class in java are the Object representation of eight primitive types in java. All the wrapper classes in java are  immutable and final. Java  auto boxing and UN-boxing allows easy conversion between primitive types and their corresponding wrapper classes in java programs.All the wrapper classes (Integer, ...