โ Back to Methods
Question 177
Write a Generic Method to Print Two Items
Write a Generic Method to Print Two Items
Complete the generic static methodprintTwoItemsthat 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 callPrinter.printTwoItems('A', 'B')andPrinter.printTwoItems(5, 10)and verify each value prints on its own line. Expected Output: A B 5 10
Expected Output:
A B 5 10
Topics:
GenericsMethods
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.