The overloaded align(int) method

The align(int) method will first align the rows of a multistring value, and will then indent it with the specified spaces. The following is an example:

String comment =  
       `one  
          of 
                  my 
           favorite 
               lang 
                   feature 
       from Amber(!)  
`.align(15); 
System.out.println(comment); 

The output of the preceding code is as follows (the text on each line is preceded by fifteen spaces):

               one  
                  of 
                          my 
                   favorite 
                       lang 
                           feature 
               from Amber(!)  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.75.165