please explain what happened.
Type: Posts; User: Norm
please explain what happened.
The code is still missing the {}s following the else.
And there is still a hidden } at the end of a statement.
The Scanner class has a close() method that the program should call when it is...
Does it compile, execute and give the right answer?
Copying values from L to temp is not necessary. Use the variables: L & M in the following if statements.
The variable names should be changed...
double Final = MaxMethod(FirstNum, SecondNum);
The value returned by the method is saved in the variable: Final
BTW method names and variable names should start with lowercase letters
A problem I see is that the code does not enclose the statements following the else statement in{}s.
Another problem is the hidden } at the end of a statement. Hiding }s makes the code hard to read...
Please edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting and preserve formatting.
Use some logic like an if statement to find the larger sum and return it.