源码解析
悬崖边的倔强
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
源码解析 - JDK - parseInt(String s, int radix)
/** * Parses the string argument as a signed integer in the radix * specified by the second argument. The characters in the string * must all be digits of the specified radix (as deter...原创 2018-10-19 17:05:06 · 727 阅读 · 0 评论 -
源码分析 - JDK - ArrayList.add()
以下是 ArrayList<E>类中定义的一些变量和常量,后面的方法会用到,下面也给予了一些说明。 /** * Default initial capacity.设置默认容量 */ private static final int DEFAULT_CAPACITY = 10; /** * Shared empty array ...原创 2018-10-22 17:40:06 · 206 阅读 · 0 评论 -
源码分析 - JDK - Iterator.hasNext()/next()/remove()
使用迭代器之前需要先创建,下面是创建迭代器的方法,该方法在ArrayList类中 /** * Returns an iterator over the elements in this list in proper sequence. * 返回一个可以按照适当顺序迭代list中的元素的迭代器 * 返回的Itr类,该类实现了Iterator<E>...原创 2018-10-23 14:38:37 · 1114 阅读 · 0 评论 -
源码解析 - JDK - HashMap.get(Object key)
1.源码展示本文章主要分析HashMap中的get(Object key)方法, 首先把相关方法的源码放到前面,大致有个了解然后再分析。相关的有3个方法,最外层的是我们经常调用的get(Object key)放法,而核心部分是getNode(int hash, Object key)方法,最后hash(Object key)是一个工具方法,返回具体对象的hash值。 /** ...原创 2018-11-02 16:42:34 · 547 阅读 · 0 评论
分享