|
Java Source Codes
Math Class of Java
/**
* Example of Math's Few Functions
* @author jimmi.prajapati
*
*/
public class MathDemo
{
public static void main(String[] args) {
double x = 12.632;
double y = 3.76;
System.out.println("The value of e is " + Math.E);
System.out.println("exp(" + x + ") is " + Math.exp(x));
System.out.println("log(" + x + ") is " + Math.log(x));
System.out.println("pow(" + x + ", " + y + ") is " + Math.pow(x, y));
System.out.println("sqrt(" + x + ") is " + Math.sqrt(x));
}
}
<<<----- Return to
Java Source
Code Questions Page.
Have a Question ?
post your questions here. It
will be answered as soon as possible.
Check
Java Interview
Questions for more Java Interview Questions with answers
Check
Servlet Interview
Questions for more Servlet Interview Questions with answers
Check
Structs Interview
Questions for more Structs Interview Questions with answers
|