Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        double d1 = 0.0, d2 = 1234.5, d3 = (1.0 / 0.0), d4 = 1;

        System.out.println("Log " + d1 + " with base 10 = " + StrictMath.log10(d1));

        System.out.println("Log " + d2 + " with base 10 = " + StrictMath.log10(d2));

        System.out.println("Log " + d3 + " with base 10 = " + StrictMath.log10(d3));

        System.out.println("Log " + d4 + " with base 10 = " + StrictMath.log10(d4));
    }
}