Assign an operator symbol to a variable and use that variable for conditional check
<p>Can I assign an operator symbol to a variable and use that variable for a conditional check?</p>

<pre><code>char operator= '&gt;';
int val1=10;
int val2=24;
if(val2 operator val1){

    /* some code*/

}
</code></pre>

<p>Why cant I use the operator variable inside conditions?</p>
