gpt4 book ai didi

Java Formatter - '#' 是什么?

转载 作者:行者123 更新时间:2023-12-04 06:18:33 27 4
gpt4 key购买 nike

根据 javadoc ,'#' 标志代表“结果应该使用依赖于转换的替代形式”。我无法找到任何详细信息。有人可以解释什么是“依赖转换的替代形式”?

最佳答案

javadoc中给出了一些例子。

例如,对于以八进制输出的整数,

If the '#' flag is given then the output will always begin with the radix indicator '0'.



或作为十六进制,

If the '#' flag is given then the output will always begin with the radix indicator "0x".



对于浮点数,

If the '#' flag is given, then the decimal separator will always be present.

关于Java Formatter - '#' 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6910724/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com