Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.DecimalFormat;

public class Main {
    public static void main(String args[]) {
        double d = 0.12345;

        System.out.println(new DecimalFormat("0.#####E0").format(d));
    }
}
//1.2345E-1