 <p>It depends on what <code>stringArray</code> is. If it's a <a href="http://www.j2ee.me/javase/6/docs/api/java/util/Collection.html" rel="nofollow noreferrer"><code>Collection</code></a> then fine. If it's a true array, you should make it a <code>Collection</code>. The <code>Collection</code> interface has a method called <a href="http://bit.ly/2o9fix" rel="nofollow noreferrer"><code>contains()</code></a> that will determine if a given <code>Object</code> is in the <code>Collection</code>.</p> <p>Simple way to turn an array into a <code>Collection</code>:</p> <pre><code>String tokens[] = { ... } List&lt;String&gt; list = Arrays.asList(tokens); </code></pre> <p>The problem with a <a href="http://www.j2ee.me/javase/6/docs/api/java/util/List.html" rel="nofollow noreferrer"><code>List</code></a> is that lookup is expensive (technically linear or <code>O(n)</code>). A better bet is to use a <a href="http://www.google.com.au/search?hl=en&amp;rlz=1C1GGLS_enAU314AU317&amp;q=java.util.set+6&amp;btnG=Search&amp;meta=&amp;aq=f&amp;oq=" rel="nofollow noreferrer"><code>Set</code></a>, which is unordered but has near-constant (<code>O(1)</code>) lookup. You can construct one like this:</p> <p>From a <code>Collection</code>:</p> <pre><code>Set&lt;String&gt; set = new HashSet&lt;String&gt;(stringList); </code></pre> <p>From an array:</p> <pre><code>Set&lt;String&gt; set = new HashSet&lt;String&gt;(Arrays.asList(stringArray)); </code></pre> <p>and then <code>set.contains(line)</code> will be a cheap operation.</p> <p><strong>Edit:</strong> Ok, I think your question wasn't clear. You want to see if the line contains any of the words in the array. What you want then is something like this:</p> <pre><code>BufferedReader in = null; Set&lt;String&gt; words = ... // construct this as per above try { in = ... while ((String line = in.readLine()) != null) { for (String word : words) { if (line.contains(word)) [ // do whatever } } } } catch (Exception e) { e.printStackTrace(); } finally { if (in != null) { try { in.close(); } catch (Exception e) { } } } </code></pre> <p>This is quite a crude check, which is used surprisingly open and tends to give annoying false positives on words like "scrap". For a more sophisticated solution you probably have to use regular expression and look for word boundaries:</p> <pre><code>Pattern p = Pattern.compile("(?&lt;=\\b)" + word + "(?=\b)"); Matcher m = p.matcher(line); if (m.find() { // word found } </code></pre> <p>You will probably want to do this more efficiently (like not compiling the pattern with every line) but that's the basic tool to use.</p>