Online Java Compiler

import java.lang.Math; public class Example { public static void main(String[] args) { // declaring and initializing two double values double x = 300.0; double y = 100000; // printing their base 10 logarithms System.out.println("Base 10 logarithm of "+ x + " is " + Math.log10(x)); System.out.println("Base 10 logarithm of "+ y + " is " + Math.log10(y)); } }