1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
/* Find exponential value of a number using Math.exp This java example shows how to find an exponential value of a number using exp method of Java Math class. */ public class FindExponentialNumberExample { public static void main(String[] args) { /* * To find exponential value of a number, use * static double exp(double d) method of Java Math class. * * It returns e raised to argument value. */ System.out.println("Exponential of 2 is : " + Math.exp(2)); } } /* Output would be Exponential of 2 is : 7.38905609893065 */ |
Add Comment