sqt() Method in java

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

1249

Program:

 public class WrapperminMethod {

    public static void main(String args[]) {
	      double x = 21.635;
	      double y = 2.76;

	      System.out.printf("The value of e is %.4f%n", Math.E);
	      System.out.printf("sqrt(%.3f) is %.3f%n", x, Math.sqrt(x));
	   }
}


/*

Returns the square root of the argument.

*/

Output:

The value of e is 2.7183
sqrt(21.635) is 4.651
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.