Write a Generic Method to Print Two Items
easyQuestion 177Complete the generic static method printTwoItems that takes two values of the same type and prints each one on its own line.
IMPORTANT: Do NOT write a main method. A hidden test will call Printer.printTwoItems('A', 'B') and Printer.printTwoItems(5, 10) and verify each value prints on its own line.
Expected output
A B 5 10
= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
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.