code: public boolean hasExpired() {
          if (maxAge == 0) return true;
  
          // if not specify max-age, this cookie should be
          // discarded when user agent is to be closed, but
          // it is not expired.
          if (maxAge == MAX_AGE_UNSPECIFIED) return false;
  
          long deltaSecond = (System.currentTimeMillis() - whenCreated) / 1000;
          if (deltaSecond > maxAge)
              return true;
          else
              return false;
      }
docs: Reports whether this http cookie has expired or not.
  
  @return  <tt>true</tt> to indicate this http cookie has expired;
  otherwise, <tt>false</tt>