Question: What is String.stripIndent() in Java 15?Answer:Suppose we have a multi-line string where each line is intended and has some trailing spaces, such as the following. We print each line, bounded by two vertical bars. As you learned in the first chapter, the alignment of a text block is based on the closing quotation marks. The output, therefore, looks like this: Using the The output is now: |
Guardar para repaso
Guarda este elemento en marcadores, marcalo como dificil o agregalo a un conjunto de repaso.
Inicia sesion para guardar marcadores, preguntas dificiles y conjuntos de repaso.
Lo mas util segun los usuarios:
- What is Java 15?
- What is Text Blocks or Multi-line string in Java 15?
- What are New String and CharSequence Methods in Java 15?
- What is CharSequence.isEmpty() in Java 15?
- Provide the release notes of Java 15.