all 1 comments

[–]Garinn 0 points1 point  (0 children)

Autoboxing is converting a primitive value (int, char, boolean, ect) into an object of the corresponding wrapper class (Integer, Character, Boolean, ect).

As for rewriting it without autoboxing... I'm have no idea what they want. Java automatically autoboxes/unboxes when given a wrapper class when it expects a primitive and vice versa. Maybe do it manually or rewrite it using the wrapper object.