pow() Method in java

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

974

Program:

 public class WrapperpowMethod {

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

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


/*

Returns the value of the first argument raised to the power
of the second argument.

*/

Output:

The value of e is 2.7183
pow(13.635, 3.760) is 18463.045
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.