Which two are successful examples of autoboxing? (Choose two.)
Which two are successful examples of autoboxing? (Choose two.)
Autoboxing in Java is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. Autoboxing works for Integer, Long, Double, etc., but not for classes like String. Therefore, assigning a primitive int value to an Integer object and a primitive long value to a Long object are successful examples of autoboxing. Thus, 'Integer e = 5;' and 'Long c = 23L;' are correct examples.
Correct Answer: BE?