What is Autoboxing in Java? Give an example.
16 Likes
The automatic conversion of primitive data type into an object of its equivalent wrapper class is known as Autoboxing. For example, the below statement shows the conversion of an int to an Integer.
Integer a = 20;
Answered By
6 Likes
Predict the output of the following code snippet:
char ch='B', char chr=Character.toLowerCase(ch); int n=(int)chr-10; System.out.println((char)n+"\t"+chr);
The method to convert a String to double is: