Home >>Java Math Methods >Java Math.log10() method
The Math.log10() Method in Java Math is used when the base is 10 to find out a number's Logarithmic. This method returns a double value of the base 10 logarithm.
public static double log10(double x)
x= This parameter is used for a value entered by user
It is used to returns the base 10 logarithm of a.
public class MyClass
{
public static void main(String[] args)
{
double a = 23.4;
System.out.println(Math.log10(a));
}
}
public class MyClass
{
public static void main(String[] args)
{
double a = 50000;
System.out.println(Math.log10(a));
}
}