CJCoding With Joseph
15free / daySign inCreate account

Complete the generic method copyIntoBox in the BoxTools class. It receives a Box<T> and a value of type T, and should store that value in the box using its setItem method.

The full Box class and the method signature are already provided.

IMPORTANT: Do NOT write a main method. A hidden test will create String and Integer boxes, call copyIntoBox to update them, then print the new stored values using getItem().

Expected output

new value
50

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
GenericsMethods
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.