what is ✔ Unboxing:in java
with exmaple?
Answers
Answered by
9
Answer :-
Unboxing :-
- Automatically converting an object of a wrapper class to its corresponding primitive type is known as unboxing. – conversion of Integer to int, Long to long, Double to double etc.
Example:
Integer x=45; // autoboxing where x is object of Integer class
int y=x; // unboxing where object x is converted to int datatype
Answered by
0
Answer:
Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing.
Explanation:
Similar questions
Hindi,
3 hours ago
Science,
3 hours ago
Computer Science,
3 hours ago
Math,
5 hours ago
English,
8 months ago