Tag Archives: java-wrapper-class

Prerequisite – Autoboxing and unboxing in Java 1)What is the output of the following program? filter_none edit close play_arrow link brightness_4 code class Main {… Read More
In Java, int is a primitive data type while Integer is a Wrapper class. int, being a primitive data type has got less flexibility. We… Read More
Given a number in a given base, convert it into another target base. Examples Input : Number = "123" Source Base = 8 Target Base… Read More
Long class is a wrapper class for the primitive type long which contains several methods to effectively deal with a long value like converting it… Read More
Integer class is a wrapper class for the primitive type int which contains several methods to effectively deal with a int value like converting it… Read More
Short class is a wrapper class for the primitive type short which contains several methods to effectively deal with a short value like converting it… Read More
Byte class is a wrapper class for the primitive type byte which contains several methods to effectively deal with a byte value like converting it… Read More
Double class is a wrapper class for the primitive type double which contains several methods to effectively deal with a double value like converting it… Read More
Float class is a wrapper class for the primitive type float which contains several methods to effectively deal with a float value like converting it… Read More
Java provides a wrapper class Boolean in java.lang package. The Boolean class wraps a value of the primitive type boolean in an object. An object… Read More
Autoboxing: Converting a primitive value into an object of the corresponding wrapper class is called autoboxing. For example, converting int to Integer class. The Java… Read More
Most of the time, while working with numbers in java, we use primitive data types. But, Java also provides various numeric wrapper sub classes under… Read More
Java provides a wrapper class Character in java.lang package. An object of type Character contains a single field, whose type is char. Creating a Character… Read More
A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains… Read More
Consider below Java program. filter_none edit close play_arrow link brightness_4 code // Java program to demonstrate that prmitive // wrapper classes are immutable class Demo… Read More