title: Find and print a string using a piece of other string
body: <p>I have the following code</p>
  <pre><code>    ArrayList&lt;String&gt; proposta = new ArrayList&lt;String&gt;();
      String propostaString = &quot;&quot;;
      proposta.add(&quot;213141441414&quot;);
      proposta.add(&quot;515151551&quot;);
      proposta.add(&quot;2626262662&quot;);
      proposta.add(&quot;26262627373&quot;);
      proposta.add(&quot;7373632525&quot;);
      proposta.add(&quot;1515252&quot;);
      proposta.add(&quot;262636474&quot;);
      proposta.add(&quot;11414142222&quot;);
      String entrada = proposta.toString();
      
      String lastDigitsClient = &quot;2222&quot;;
      String lastFour = &quot;2222&quot;;
      boolean Equal = false;
      if(lastDigitsClient.contains(lastFour)) {
          Equal=true;
          System.out.println(&quot;ULTIMOS DIGITOS : TRUE = &quot; +Equal);
          System.out.println(&quot;Lista de Propostas: &quot; +entrada);
  
      }
  </code></pre>
  <p>I want to print the proposta 11414142222 using the value of lastDigitsClient, how could I do it?</p>