CJCoding With Joseph
15per day

Write a Generic Printer Method

Complete the generic static method printItem inside the Printer class. It takes one parameter of any type and prints it to the console.

IMPORTANT: Do NOT write a main method. A hidden test will call Printer.printItem("Java"), Printer.printItem(25), and Printer.printItem(2.5) and verify each value prints on its own line.

Expected Output:
Java
25
2.5

Expected Output:

Java
25
2.5
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.