Source_Code/myinterpreter/EvaluateString.java
// This method returns true if 'operator2' has higher or same precedence as 'operator1',otherwise returns false.
This method returns true if 'operator2' has higher or same precedence as 'operator1',otherwise returns false.
This method returns true if ' operator2 ' has higher or same precedence as ' operator1 ' otherwise returns false .
public static boolean hasPrecedence(char operator1, char operator2)
 {
     if (operator2 == '(' || operator2 == ')')
         return false;
     if ((operator1 == '*' || operator1 == '/') && (operator2 == '+' || operator2 == '-'))
         return false;
     else
         return true;
 }
public static boolean hasPrecedence ( char operator1 , char operator2 ) { if ( operator2 == '(' || operator2 == ')' ) return false ; if ( ( operator1 == '*' || operator1 == '/' ) && ( operator2 == '+' || operator2 == '-' ) ) return false ; else return true ; }
This method returns true if 'operator2' has higher or same precedence as 'operator1',otherwise returns false.
This method returns true if ' operator2 ' has higher or same precedence as ' operator1 ' otherwise returns false .