CJCoding With Joseph
15per day

Make a Generic Wrapper Class

Complete the Wrapper<T> class. The field is already declared. Add a constructor that stores the value, and complete the showValue() method so it prints the stored item.

IMPORTANT: Do NOT write a main method. A hidden test will create a Wrapper<String> with "Hello" and a Wrapper<Double> with 8.5, then call showValue() on each.

Expected Output:

Hello
8.5
Topics:
GenericsClasses
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.