Given the following code
public class TextBlock {
public static void main(String[] args) {
String indentedText = """
hello
indented
world
""";
System.out.println(indentedText);
}
}
The output is as follows (mind the leading spaces):
hello
indented
world
How to obtain String value like below (without unnecessary leading spaces)?
hello
indented
world