public class SpaceFlagTest
1: // Fig. 28.17: SpaceFlagTest.java
2: // Printing a space before non-negative values.
3:
4: public class SpaceFlagTest
5: {
6: public static void main( String args[] )
7: {
8: System.out.printf( "% d\n% d\n", 547, -547 );
9: } // end main
10: } // end class SpaceFlagTest
11:
12: /**************************************************************************
13: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
14: * Pearson Education, Inc. All Rights Reserved. *
15: * *
16: * DISCLAIMER: The authors and publisher of this book have used their *
17: * best efforts in preparing the book. These efforts include the *
18: * development, research, and testing of the theories and programs *
19: * to determine their effectiveness. The authors and publisher make *
20: * no warranty of any kind, expressed or implied, with regard to these *
21: * programs or to the documentation contained in these books. The authors *
22: * and publisher shall not be liable in any event for incidental or *
23: * consequential damages in connection with, or arising out of, the *
24: * furnishing, performance, or use of these programs. *
25: *************************************************************************/