/*
Find natural logarithm value of a number using Math.log
This java example shows how to find natural logarithm value of a
number using log method of Java Math class.
*/
public class FindNaturalLogarithmOfNumberExample {
public static void main(String[] args) {
/*
* To find natural logarithm value of a number, use
* static double log(double d) method of Java Math class.
*/
System.out.println("Natural logarithm value of 2 is : " + Math.log(2));
}
}
/*
Output would be
Natural logarithm value of 2 is : 0.6931471805599453
*/
Bookmark/Search this post with: