

Hi,
Here is the answer.
For every primitive type in Java, there is a built-in object type called a wrapper class. For example, the wrapper class for int is called Integer; for double it is called Double.
Wrapper classes are useful for several reasons:
Each wrapper class contains special values (like the minimum and maximum values for the type) and methods that are useful for converting between types.You can instantiate wrapper classes and create objects that contain primitive values. In other words, you can wrap a primitive value up in an object, which is useful if you want to invoke a method that requires an object type.
The most straightforward way to create a wrapper object is to use its constructor:
Integer i = new Integer (1);
Integer i = Integer.valueOf ("1");
String s = new String ("gyan");
String s = "gyan";
Thanks.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.