title: Difference between anyMatch and findAny in java 8
body: <p>I have an <code>Array</code> and want to perform some matching on it's element.</p>
  <p>I came to know that it could be done in two ways in <code>java 8</code> :</p>
  <pre class="lang-java prettyprint-override"><code>String[] alphabet = new String[]{&quot;A&quot;, &quot;B&quot;, &quot;C&quot;};
  </code></pre>
  <p><strong>anyMatch :</strong></p>
  <pre class="lang-java prettyprint-override"><code>Arrays.stream(alphabet).anyMatch(&quot;A&quot;::equalsIgnoreCase);
  </code></pre>
  <p><strong>findAny :</strong></p>
  <pre class="lang-java prettyprint-override"><code>Arrays.stream(alphabet).filter(&quot;a&quot;::equalsIgnoreCase)
          .findAny().orElse(&quot;No match found&quot;));
  </code></pre>
  <p>As I can understand both are doing the same work. However, I could not found which one to prefer?</p>
  <p>Could someone please make it clear what is the difference between both of them.</p>