title: How to remove a element from arraylist in android
body: <p>I couldn't remove object.How can I remove a object from an arraylist?</p>
  <h1>my code</h1>
  <pre><code> List&lt;kisi&gt; x=new ArrayList&lt;kisi&gt;();
   x.add(new kisi(&quot;1&quot;,&quot;betül&quot;));
   x.add(new kisi(&quot;2&quot;,&quot;hatice&quot;));
   x.add(new kisi(&quot;3&quot;,&quot;selma&quot;));
   kisi k=new kisi(&quot;2&quot;,&quot;hatice&quot;);
       
   for (int i = 0; i &lt; x.size(); i++) {
   if (x.get(i).id==k.id) {
   Object obj = x.remove(i);
   break;
   }
   }
  </code></pre>
  <h1>my constructor</h1>
  <pre><code>public class kisi {
   public static String id=&quot;0&quot;;
   public static String ad=&quot;0&quot;; 
  public kisi(String id,String ad) { 
  // TODO Auto-generated constructor stub 
  this.id=id;
   this.ad=ad;
   }
  </code></pre>