java use variables inside strings
Java 15+ String foo = "foo"; String bar = "bar"; String str = "First %s, then %s".formatted(foo, bar);
Source: stackoverflow.com
Java 15+ String foo = "foo"; String bar = "bar"; String str = "First %s, then %s".formatted(foo, bar);