public class MyProgram { public static double min ( double a, double b ) { double m = 0; if ( a < b ) { m = a; // a is the smaller value } else { m = b; // b is the smaller value } return(m); // Output of the method } public static void main(String[] args) { double r; r = MyProgram.min( 1.0, 4.0 ); System.out.println(r); r = MyProgram.min( 3.7, -2.9 ); System.out.println(r); r = MyProgram.min( -9.9, 3.8 ); System.out.println(r); } }