Core Java Tutorial

Core Java Tutorial

Math Example Program for exp(double a)

[java]
//Example program for Exponent
/**
@author:candidjava.com
@Description:program for exponent using exp() method
*/
public class expo
{
public static void main(String args[])
{
//initialize a double value
double a=1.0;
//print the exponent value using exp() method
System.out.println(Math.exp(a));
}
}
[/java]

OUTPUT:
2.7182818284590455