title: How to append string dynamically?
body: <p>Hi my requirement is to produce following string: </p>
  
  <pre><code>qid&lt;&gt; 0 And qid&lt;&gt; 1 And qid&lt;&gt; 2 And qid&lt;&gt; 3 And qid&lt;&gt; 4 And qid&lt;&gt; 5 And qid&lt;&gt; 6 And qid&lt;&gt; 7 And qid&lt;&gt; 8 And qid&lt;&gt; 9 
  </code></pre>
  
  <p>So I did like this:</p>
  
  <pre><code>import java.util.*;
  import java.lang.*;
  import java.io.*;
  
  /* Name of the class has to be "Main" only if the class is public. */
  class Ideone
  {
      public static void main (String[] args) throws java.lang.Exception
      {
          // your code goes here
         String deleteQids="qid&lt;&gt; ";
         String deleteqidString1="";
  
         for(int i=0;i&lt;10;i++) {
           deleteqidString1+=deleteQids+i +" And ";
         }
         System.out.println(deleteqidString1);
      }
  }
  </code></pre>
  
  <p><a href="http://ideone.com/dpFfxF" rel="nofollow">http://ideone.com/dpFfxF</a></p>
  
  <p>But at the end <strong>And</strong> appears.</p>
  
  <p>Can anybody please tell me how to get rid of this?</p>