title: how to check if a string contain any of operator in java
body: <p>i wanted to check if string contains operand</p>
  
  <pre><code>    char m='\0';
      char match[]={'(',')','=',';','{','}','[',']','+','- 
              ','*','/','&amp;','!','%','^','|','&lt;','&gt;'};                                                                            
      for(int i =0; i&lt;code.length(); i++)
      {
          m=code.charAt(i);
          for(int j=0;j&lt;match.length;j++){
              if(m==match[j]){
                  o++;
                              }
                       }
             }
  </code></pre>
  
  <p>The above code can get the total no of operand use in string, but is there some easy way.</p>