max() Method in java

Java Programming Language Number Class in java (Article) Number Class in java (Program)

848

Program:

 public class WrappermaxMethod {

     public static void main(String args[]) {

	       System.out.println(Math.max(122.123, 112.456));
	       System.out.println(Math.max(223.12, 243.0));
	    }
	 }


/*

Returns the larger of the two arguments.

*/

Output:

122.123
243.0
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.