← Back to Methods
Question 279
Larger of Two Numbers (Practice)
Larger of Two Numbers (Practice)
Create a class named NumberUtil with a public static method Max that takes two integers, a and b, and returns whichever one is larger. If both values are equal, returning either one is correct. For example, Max of 4 and 9 returns 9.
Expected Output:
9= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
Methods
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.