code: public static boolean isBinaryCompatible(short ver) {
          if(version == ver)
              return true;
          short tmp_major=(short)((ver & MAJOR_MASK) >> MAJOR_SHIFT);
          short tmp_minor=(short)((ver & MINOR_MASK) >> MINOR_SHIFT);
          return major == tmp_major && minor == tmp_minor;
      }
docs: Checks whether ver is binary compatible with the current version. The rule for binary compatibility is that
  the major and minor versions have to match, whereas micro versions can differ.
  @param ver
  @return