title: Printing only the first 5 characters of a string in one line
body: <p>Im trying to print just the first 5 characters of a given string in one line. My problem is the whole string is not being printed. Part of the end is being cut off.</p>
  
  <pre><code>  int l = 0;
        int m = 5;
        for(int i = 0; i &lt; (string.length()/5) ; i++)
        {
              System.out.println(string.substring(j,k));
              l = m;
              m = m + 5;
  
        }
  </code></pre>
  
  <p>Given <code>string = "Hello world, my name is something which you want to"</code>
  The result would be something like:</p>
  
  <pre><code>Hello
   worl
  d, my
  </code></pre>
  
  <p>However, the last parts of the string is not being printed. </p>