• 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

Formatter Flags « Development « Java Tutorial






  1. Java Tutorial
  2. Development
  3. Formatter Flags
6.6.Formatter Flags
6.6.1.Using the Format Flags
6.6.2.The %n inserts a newline: the %n and %% format specifiers
6.6.3.Left justification
6.6.4.The Space, +, 0, and '(' Flags: To show a '+' sign before positive numeric values, add the + flag
6.6.5.Demonstrating the space format specifiers
6.6.6.To show negative numeric output inside parentheses, rather than with a leading -, use the '(' flag
6.6.7.The 0 flag
6.6.8.The Comma Flag(,) : to add grouping specifiers
6.6.9.The # Flag








6.6.10.format: %#x
6.6.11.format: %#o
6.6.12.Demonstrate the %g format specifier.

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