1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /* 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 */ |

## Add Comment