Most efficient way to find the count of matches a string has against an array of words?
<p>let's say I have a string</p>

<pre><code>String test = "This is a test string and I have some stopwords in here";
</code></pre>

<p>and I want to see how many times the words in the array below match against my string</p>

<p>psudocode</p>

<pre><code>array = a,and,the,them,they,I
</code></pre>

<p>so the answer would be "3"</p>

<p>just curious what the most efficient way to do that in java is?</p>
