The second line of this text block contains two space characters and nothing else. Every space in the result is printed as a dot and every line terminator as a pipe. What does this program print?
```java
public class Main {
public static void main(String[] args) {
String s = """
one
two
""";
System.out.println(s.replace(' ', '.').replace("\n", "|"));
}
}
```
A. one||two|Correct answer
The two-space line is blank so it is excluded from the minimum-indentation vote and then emptied by trailing-whitespace stripping; content is "one", an empty line, "two", plus a final terminator (the closing delimiter is on its own line), printed one||two|.
B. ..........one||..........two|
Assumes the two-space line joins the indentation vote and drags the minimum to 2, leaving 10 spaces on the real lines; blank lines never take part in that vote.
C. one|..|two|
Assumes the two spaces on the blank line survive as content; trailing whitespace is stripped from every line, so a line of only spaces becomes empty.
D. one||two
Assumes a text block never ends with a line terminator; the closing delimiter is on its own line, so the final content line keeps its terminator, giving a trailing pipe.
Explanation
Trace: the minimum indentation is computed over the *non-blank* content lines plus the closing delimiter's line. The line holding only two spaces is entirely white space, so it is a blank line and is excluded from that computation; the closing delimiter's line is never excluded. That leaves `one` (12), `two` (12) and the closing delimiter (12), so 12 characters are stripped from the start of every line. Incidental *trailing* white space is then removed from every line, which empties the two-space line completely. The content is therefore `one`, an empty line, `two`, and because the closing delimiter sits on its own line the block ends with a line terminator: "one\n\ntwo\n" — printed as `one||two|`.
Why the others are wrong:
`one|..|two|` assumes the two spaces on the blank line survive as content. They do not: trailing white space is stripped from every line, and on a line made only of spaces that removes everything.
`..........one||..........two|` assumes the two-space line joins the minimum-indentation vote and drags the minimum down to 2, leaving 10 spaces of indentation on the real lines. Blank lines never take part in that vote.
`one||two` assumes a text block never ends with a line terminator. Putting the closing delimiter on its own line makes the last content line a full line, terminator included; only a closing delimiter placed at the end of a content line suppresses it.
Exam tip: the significant-indentation rule has exactly one exception in each direction — blank lines are ignored when computing the minimum, and the closing delimiter's line is counted even though it is blank. Drop the closing delimiter to column 0 and nothing is stripped at all.