Files
java-core-examples/string-format/output/01-basics.txt
T

22 lines
640 B
Plaintext

== conversions: what kind of value ==
text | 42 | 3.141590 | ff | A | true
== width: minimum characters ==
[ ab] [ab ] [ 42] [42 ]
== precision: digits after the point (f), or max chars (s) ==
[3.14] [4] [ 3.142] [abc]
== flags ==
[00042] [+42] [-42] [ 42] [(42)] [1,234,567]
[0xff] [010] [FF] [-003.142]
== argument index: reuse and reorder ==
hello world
echo, echo and again echo
== %n and %% ==
100% sure
next line
== %s accepts anything (calls String.valueOf / toString) ==
[null] [7] [[1, 2]] [SHOUT]
== %b is not 'is this the string true' ==
true true false false
== %c takes a char or a code point ==
A A 😀