Automatic conversion of primitive data into an object of a wrapper class is called autoboxing.
Explanation:
- Autoboxing is a feature in Java that allows automatic conversion between primitive types (such as
int
, float
, double
, etc.) and their corresponding wrapper classes (such as Integer
, Float
, Double
, etc.).
- For example, Java automatically converts an
int
to an Integer
when it is assigned to an Integer
object or used in a context where an Integer
is expected.
Correct Answer:
a) autoboxing