Why isn't this "else" statement working?
<pre><code>for (int i = 0; i &lt; charArray.length; i++) {
            char temp = charArray[i];

            if (temp == ONE || temp == THREE || temp == FIVE) {
                stack.push(temp);

            }   else if (temp == TWO || temp == FOUR || temp == SIX) {
                if (temp == TWO &amp;&amp; stack.peek().equals(ONE)){
                    stack.pop();
                }   else if (temp == FOUR &amp;&amp; stack.peek().equals(THREE)) {
                    stack.pop();
                }   else if (temp == SIX &amp;&amp; stack.peek().equals(FIVE)) {
                    stack.pop();
                }   else {
                    System.out.println("There is a mistake at index: " + charArray[i]); //why doesn't this work!
                }
            }

        }//for
</code></pre>

<p>That line is skipped at run time.  </p>

<p>The assignment is to write a program using a list or collection that checks if the grouping symbols in a program are overlapped.  I thought it would be cute to tell the user where.   </p>

<p>The final ONE, TWO, THREE, etc are '{', '}', '(', etc.</p>

<p>Thanks!</p>
