第一次查看jdk源码

第一次查看jdk源码,千里之行,始于足下。

    /**
     * Returns <tt>true</tt> if this list contains no elements.
     *
     * @return <tt>true</tt> if this list contains no elements
     */
    public boolean isEmpty() {
        return size == 0;
    }

上面是ArrayList的isEmpty方法。

从这里开始。

猜你喜欢

转载自blog.csdn.net/qq_35583089/article/details/79985364