3 ms·
The last newline is not automatically stripped in Java. jshell> var s = """ ...> hello world ...> """; s ==> "hello world\n" You have to
by azth 5y ago
The last newline is not automatically stripped in Java.
jshell> var s = """
...> hello world
...> """;
s ==> "hello world\n"
You have to escape it:
jshell> var s = """
...> hello world\
...> """;
s ==> "hello world"
- laurensr 5y agoI stand corrected, thank you.