Passing equals and not equals into a function
<p>I have two sections of code A and B that are identical to each other, except that A has this</p>

<pre><code>if(x == y)
</code></pre>

<p>and B has this</p>

<pre><code>if(x != y)
</code></pre>

<p>where x and y are integers.</p>

<p>I want to reduce replication of code and so wanted to put this code in a separate method.  The question is how do I pass the <code>==</code> and <code>!=</code> operators into such a method and execute it?</p>
