Format integer with 0.#####E0 in Java

Description

The following code shows how to format integer with 0.#####E0.

Example


//www  .j a  v a 2s.c  o  m
import java.text.DecimalFormat;

public class Main {

  public static void main(String args[]) {    
    System.out.println(new DecimalFormat("0.#####E0").format(123456));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Data Format »




Java Formatter
Java Number Formatter