mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
22 lines
568 B
Java
22 lines
568 B
Java
// "Fix all 'Redundant call to 'String.format()'' problems in file" "true"
|
|
package java.lang;
|
|
|
|
class String {
|
|
String(Object original) {}
|
|
public native String formatted(Object... args);
|
|
}
|
|
|
|
class Main {
|
|
static {
|
|
String s = (/* 1 */ new /* 2 */ String(/* 3 */"""
|
|
Hello, World!
|
|
"""/* 4 */)/* 5 */)./* 6 */<caret>formatted();
|
|
String s1 = new String("""
|
|
%s, %s!
|
|
""").formatted("Hello", "World");
|
|
String s = (/* 1 */ new /* 2 */ String(/* 3 */"""
|
|
Hello, World!%n
|
|
"""/* 4 */)/* 5 */)./* 6 */formatted();
|
|
}
|
|
}
|