new DecimalFormat("000000E0") : Decimal « Data Type « Java Tutorial

Home
Java Tutorial
1.Language
2.Data Type
3.Operators
4.Statement Control
5.Class Definition
6.Development
7.Reflection
8.Regular Expressions
9.Collections
10.Thread
11.File
12.Generics
13.I18N
14.Swing
15.Swing Event
16.2D Graphics
17.SWT
18.SWT 2D Graphics
19.Network
20.Database
21.Hibernate
22.JPA
23.JSP
24.JSTL
25.Servlet
26.Web Services SOA
27.EJB3
28.Spring
29.PDF
30.Email
31.J2ME
32.J2EE Application
33.XML
34.Design Pattern
35.Log
36.Security
37.Apache Common
38.Ant
39.JUnit
Java Tutorial » Data Type » Decimal 
2.47.7.new DecimalFormat("000000E0")Previous/Next
import java.text.DecimalFormat;

public class Main {
  public static void main(String args[]) {
    System.out.println(new DecimalFormat("000000E0").format(123123));
  }
}
//123123E0
2.47.Decimal
2.47.1.new DecimalFormat(abc#)
2.47.2.DecimalFormat("00E00")
2.47.3.DecimalFormat("000E00")
2.47.4.DecimalFormat("0000000000E0")
2.47.5.new DecimalFormat("0.######E0")
2.47.6.Use new DecimalFormat("0.#####E0") to format double
2.47.7.new DecimalFormat("000000E0")
2.47.8.Use java.text.DecimalFormat to format integer
2.47.9.Display numbers with leading zeroes
2.47.10.Display a percentage
2.47.11.Display a currency value
2.47.12.Force minimum number of digits to left and right of decimal point
2.47.13.DecimalFormat("00.00E0")
2.47.14.The number of #'s to the left of the decimal point sets the multiple of the exponent.
2.47.15.DecimalFormat("##E0") (exponent must be multiple of 2)
2.47.16.DecimalFormat("###E0") (exponent must be multiple of 3)
2.47.17.Change the decimal separator is set to "."
2.47.18.Round number to fewer decimals
2.47.19.Display numbers with commas
2.47.20.Display numbers in scientific notation
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.