Java: Programming - max3() method
Problem
Write a method which has three double parameters and
returns the largest value.
Details
- Method only. Write only the method, not main program.
- No I/O. As usual, this method should do no I/O.
- No Math methods You may not use
Math.max()orMath.min() -
Method header. The method should be defined using this header.
public static double max3(double a, double b, double c)
- Example.
d = max3(7.5, -9999.999, 1.0);
This would assign 7.5 tod.















