且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 printf 和 format 进行格式化

更新时间:2021-10-28 05:38:38

for "%b" : 如果参数 arg 为 null,则结果为 "false".如果 arg 是布尔值或布尔值,则结果是 String.valueOf() 返回的字符串.否则,结果为真".

for "%b" : If the argument arg is null, then the result is "false". If arg is a boolean or Boolean, then the result is the string returned by String.valueOf(). Otherwise, the result is "true".

参考