code: public boolean isSubPath(String[] otherPath) {
          if (path == null || otherPath == null)
              return false;
  
          if (path.length >= otherPath.length)
              return false;
  
          for (int i = 0; i < path.length; i++) {
              int result = path[i].compareTo(otherPath[i]);
              if (result != 0)
                  return false;
          }
  
          return true;
      }
docs: Returns true if it's path is a subpath of otherPath