Suppose that you have to import multiline text from a file in your Java code. How would you prefer to treat the margins of the imported text? You may have to align or indent the imported text. The text might use a custom newline delimiter (say, [), which you might prefer to strip from the text. To work with these requirements, a set of new methods, such as align(), indent(), and transform(), are being added to the String class, which we'll cover in the next section.
Managing margins
The align() method
When you define a multiline string value, you might choose to format the string against the left margin or align it with the indentation used by the code. The string values are stored with the margin intact. The align()...