Find natural logarithm value of a number using Math.log in Java

Description

The following code shows how to find natural logarithm value of a number using Math.log.

Example


/*from w w w .  j a va2 s  .  co  m*/
public class Main {

  public static void main(String[] args) {
    System.out.println("Natural logarithm value of 2 is : " + Math.log(2));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Development »




Java Algorithms
Java Clipboard
Java Compiler
Java Desktop
Java Virtual Machine
Java Math
OS
Random
Java Robot
Java RuntimeMXBean
Java Timer
Java UUID
Java Internationalization