• Home
  • Java Tutorial
  • Language
  • Data Type
  • Operators
  • Statement Control
  • Class Definition
  • Development
  • Reflection
  • Regular Expressions
  • Collections
  • Thread
  • File
  • Generics
  • I18N
  • Swing
  • Swing Event
  • 2D Graphics
  • SWT
  • SWT 2D Graphics
  • Network
  • Database
  • Hibernate
  • JPA
  • JSP
  • JSTL
  • Servlet
  • Web Services SOA
  • EJB3
  • Spring
  • PDF
  • Email
  • J2ME
  • J2EE Application
  • XML
  • Design Pattern
  • Log
  • Security
  • Apache Common
  • Ant
  • JUnit

DecimalFormat « I18N « Java Tutorial






  1. Java Tutorial
  2. I18N
  3. DecimalFormat
13.13.DecimalFormat
13.13.1.new DecimalFormat('0.00')
13.13.2.new DecimalFormat('#.#') two digits
13.13.3.new DecimalFormat('#.######') more digits
13.13.4.new DecimalFormat('.######'), keep fraction
13.13.5.new DecimalFormat('#.000000'), append zero
13.13.6.new DecimalFormat('#,###,###'), group
13.13.7.Arabic DigitsArabic Digits
13.13.8.Format a number with leading zeros
13.13.9.The . symbol indicates the decimal point








13.13.10.The , symbol is used to group numbers
13.13.11.The ; symbol is used to specify an alternate pattern for negative values
13.13.12.The ' symbol is used to quote literal symbols
13.13.13.Use group separators and show trailing zeros
13.13.14.Display numbers in scientific notation
13.13.15.Displaying numbers with commas
13.13.16.new DecimalFormat('##00')
13.13.17.The 0 symbol shows a digit or 0 if no digit present

java2s.com  | © Demo Source and Support. All rights reserved.