This shows you the differences between two versions of the page.
java:io:printstream:format [2013/04/15 08:34] 88.75.134.113 |
java:io:printstream:format [2024/02/16 01:12] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
====== format ====== | ====== format ====== | ||
format args to the format string format and write the result to the stream | format args to the format string format and write the result to the stream | ||
- | |||
<code java> | <code java> | ||
format(String format, Object... args); | format(String format, Object... args); | ||
Line 8: | Line 7: | ||
return value: stream | return value: stream | ||
</code> | </code> | ||
+ | |||
+ | ^ sign ^ Description ^ | ||
+ | |0 |if the place is not busy they prints a 0 | | ||
+ | |# |if the place is not busy they prints nothing | | ||
+ | |. |decimal separator Separates and decimal places. | | ||
+ | |, |Groups the numbers (a group is as large as the distance from "," to "."). | | ||
+ | |; |Delimiter. To the left of the pattern is positive, the right for negative numbers. | | ||
+ | |- |The default character for the negative prefix | | ||
+ | |% |The number is multiplied by 100 and reported as a percentage. | | ||
+ | |% % (without the space )|Just like %, with only thousandths. | | ||
+ | |\uXXXX |unicode XXXX stands for Numbers and chars like \u20B3 | | ||
+ | |' |Masking of special symbols in the prefix or suffix | | ||
+ | |%n |new line | | ||
+ | |%b |Boolean | | ||
+ | |%% |Percent | | ||
+ | |%s |String | | ||
+ | |%c |Unicode-Char | | ||
+ | |%d |decimaldigit | | ||
+ | |%x |hexadecimal | | ||
+ | |%t |Date / Time | | ||
+ | |%f |Float | | ||
+ | |%e |scientific notation | | ||
+ | |||
===== Language Example ===== | ===== Language Example ===== |