title: How to split the array values and store in a string in android?
body: <p>I am getting the values from arraylist <strong>arr</strong> and storing those values in a string with comma separator. But for the last value also comma is adding. How can I remove that? Please help me...</p>
  
  <p>My Code:</p>
  
  <pre><code>ArrayList&lt;String&gt; arr;  
  String str;
  
      for (int i = 0; i &lt; arr.size(); i++) {
  
                  int kk = arr.size();
                  System.out.println("splitting test" + arr.get(i));
                  str += arr.get(i) + ",";
  
                  System.out.println("result" + str);
  
  
              }
  </code></pre>