CJCoding With Joseph
15free / daySign inCreate account

Complete the generic method getMiddle that receives three values of the same type and returns the second one (the middle parameter).

IMPORTANT: Do NOT write a main method. A hidden test will call MiddleTool.getMiddle("A", "B", "C") and MiddleTool.getMiddle(10, 20, 30) and print the middle value from each call.

Expected output

B
20

= 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.