title: How can I print a new line in a toString() method in java
body: <p>Instead of the many <code>system.out.println()</code> lines, I want to write <code>System.out.println(b)</code> in TestBook.java file.
  So what should I write in the <code>toString()</code> in the Book class to return the same results to look like below</p>
  
  <pre><code>//Title: xxx
  //Author:xxx
  //Years:xxx
  //Pages:xxx
  //edition: xxxx
  //==================================
  
  public class Book {
  
  String title;
  String author;
  int yearOfPublishing;
  int numberOfPages;
  int eddition;
  
  Book ()
  {}
  
  Book ( String title, String author, int yop, int nop, int eddition)
  {
      this.title = title;
      this.author = author;
      yearOfPublishing = yop;
      numberOfPages = nop;
      this.eddition = eddition;
  
  }
  
  public String toString()
      {
      // return what?? how can i return new lines
      }
  }
  
  public class TestBook {
  
      public static void main(String[] args) {
  
          Book b = new Book("Data", "Joe", 2015, 276, 3);
  
          System.out.println ( "Title : " +b.title);
          System.out.println ( "Author : " +b.author);
          System.out.println ( "Year : " +b.yearOfPublishing);
          System.out.println ( "Pages : " +b.numberOfPages);
          System.out.println ( "Eddition : " +b.eddition);    
          System.out.println ("==================================");
  
      }
  }
  </code></pre>