Make a Generic Wrapper Class
easyQuestion 181Complete 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
= newline. The output ends with a newline, so print one after the last line.
Hints3 available
Sign in to use hintsTopics
GenericsClasses
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.