Calendar

1. before,after 方法 ,源码为:

    public boolean after(Object when) {
        return when instanceof Calendar
            && compareTo((Calendar)when) > 0;
    }

这两方法参数类型是 Object  但只有是 Calendar 类型时才有可能返回true。

原文地址:https://www.cnblogs.com/qingyibusi/p/7590876.html