ArrayList not contains string
<p>I have the following code:</p>

<pre><code>String st = "st1 15";
String sta = "15";
ArrayList&lt;String&gt; arrlist = new ArrayList&lt;String&gt;(5);
arrlist.add("string string string 15");
if (st.contains(sta) &amp;&amp; !arrlist.contains(sta)) {
  arrlist.add(st);                      
}
</code></pre>

<p>I expect that <code>arrlist.add(st);</code> will not be executed am I wrong? When i execute the code <code>if</code> statement is <code>true</code> and <code>arrlist</code> is filled with <code>st</code>
Any help would be appreciated :) sorry If I'm making a serious mistake, I'm pretty new.</p>