找不到formatted
Topic source看JDK文档:
public String formatted(Object... args)
This method is associated with text blocks, a preview feature of the Java language. Programs can only use this method when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java language.
Formats using this string as the format string, and the supplied arguments.
Implementation Requirements:This method is equivalent to String.format(this, args).
Parameters:args - Arguments referenced by the format specifiers in this string.
Returns:A formatted string
Since:13
那个Since 13说明此方法从JDK 13开始提供
- 1
EmperorWS
老师,为什么我找不到formattedf方法,这是新版Java才有的吗?