注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
本帖最后由 techDiscussion 于 2020-12-24 02:55 编辑
我一直用Intelli J去找源代码的实现
但今天尝试找:
List<Integer> b = new LinkedList<>();
b.indexOf(1);
Command 点 indexOf 只出现了下面的货:
int indexOf(Object o);
/**
* Returns the index of the last occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the highest index {@code i} such that
* {@code Objects.equals(o, get(i))},
* or -1 if there is no such index.
*
* @param o element to search for
* @return the index of the last occurrence of the specified element in
* this list, or -1 if this list does not contain the element
* @throws ClassCastException if the type of the specified element
* is incompatible with this list
* (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* list does not permit null elements
* (<a href="Collection.html#optional-restrictions">optional</a>)
*/
大家知道哪里可以找到真正implement的方法吗?
、
我朋友说,可能的一个原因是,这个方法不是公开的,是保密的? 哈哈哈
|