March 2019
Intermediate to advanced
242 pages
6h 21m
English
To add a newline or tab to a traditional string value, you can use the escape sequences \n and \t. Escape sequences are letters preceded with \ (a backslash), and they have a special meaning in Java. For example in Java strings, \n is used as a newline, and \t is used as a tab.
The following code shows how you can store the multiline string value with newline and tab escape sequences. The newline and tab escape sequences will include the indentation in the variable HTML: ...
Read now
Unlock full access