Split id and add to array
<p>I have to split off the last two characters of an ID, the id may vary in length. example 56427R1 and R00220P3. Once the last two characters are split off, I need to add the first set of characters and the last two characters to an ArrayList. Thanks in advance.  </p>

<p>I've tried the following</p>

<pre><code>            List&lt;String&gt; list = new ArrayList&lt;String&gt;();
            list.add(clientValue.substring(0, clientValue.length()-2));
</code></pre>

<p>but was having trouble keeping the last 2 characters while removing the first half. </p>

<p>Resolved, repaired with the following code</p>

<pre><code>            ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
            list.add(clientValue.substring(clientValue.length()-2));
            list.add(clientValue.substring(0, clientValue.length()-2));
</code></pre>
