public class MaxNum {
public static void main()
{ double m=max(3.1,12.5,65,333,126); System.out.println(m); } public static double max(double...values){ double largest=Double.MIN_VALUE; for(double v:values)if(v>largest)largest=v; return largest; } }