Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:java:formatting [2018/08/10 13:08] bernstdhstudent:java:formatting [2018/08/10 13:09] (current) bernstdh
Line 21: Line 21:
 Format specifiers have the following syntax. Format specifiers have the following syntax.
  
-^ ^ 
 |  %[//flags//][//width//][.//precision//]//conversion//  | |  %[//flags//][//width//][.//precision//]//conversion//  |
  
Line 34: Line 33:
 The format string in the invocation of the ''%%format()%%''  method should have the same number of format specifiers as there are  other parameters in the invocation. This is illustrated in the following  example. The format string in the invocation of the ''%%format()%%''  method should have the same number of format specifiers as there are  other parameters in the invocation. This is illustrated in the following  example.
  
-<code>+<code java>
  int  year = 2017;  int  year = 2017;
  double sales = 1050987.00;  double sales = 1050987.00;