Formatter: format(String format, Object... args) : Formatter : Development Class : Java examples (example source code) Organized by topic

Java
C++
PHP


Java  »  Development Class   » [  Formatter  ]  Screenshots 
 



Formatter: format(String format, Object... args)

/**
 *Output:
Formatting with Java is easy 10 98.600000
 */

import java.util.Formatter;

public class MainClass {
  public static void main(String args[]) {
    Formatter fmt = new Formatter();

    fmt.format("Formatting %s is easy %d %f""with Java"1098.6);

    System.out.println(fmt);
  }
}

           
       
Related examples in the same category
1.  Formatter: %g
2.  Formatting time and date
3.  Demonstrate the %n and %% format specifiers
4.  Demonstrate a field-width specifier
5.  Create a table of squares and cubes
6.  Demonstrate the precision modifier
7.  Demonstrate left justification
8.  Demonstrate the space format specifiers
9.  Use arguments indexes to simplify the creation of a custom time and date format
























Home| Contact Us
Copyright 2003 - 07 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.