Larger num using a method

Ok here my current problem:
Create a main class file. (1) Inside create a method max() that has two floating point
parameters x and y and returns the larger of x and y; (2) In the main method, input two
numbers from the keyboard, and then use the max() method you created to compute the
larger value and output it.

this is what i have the problem is that teoutput tends to be the second number entered not the larger of the two, not sure how to change that.