CJCoding With Joseph
15free / daySign inCreate account

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

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
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.