title: Add a new line character after a "{" or ";" or "}" in java while using string builder
body: <p>While using the stringbuilder class i need to append the "\n" after every "{" or "}" or ";".And then need to write the same in file.</p>
  
  <p>Output of stringbuilder object i.e </p>
  
  <pre><code>System.out.println(sb.toString());
  </code></pre>
  
  <p>is</p>
  
  <pre><code>nav {  ul {    list-style: none;    margin: 0;    padding: 0;  }  li { display: inline-block; }  a {        display: block;    padding: 6px 12px;    text-decoration: none;  }
  </code></pre>
  
  <p>Please help.
  Thanks</p>