JDK源码解读
JDK源码解读
说文科技
做有态度的研究。
展开
-
jdk源码详解之StringTokenizer
jdk源码详解之StringTokenizer1.类释义The string tokenizer class allows an application to break a string into tokens2.3.类方法3.1 hasMoreTokens()译:判断在这个tokenizer 字符串中是否有更多可用的tokens。如果这个方法返回 true,那么后续对无参的...原创 2019-01-16 10:04:20 · 455 阅读 · 0 评论 -
jdk源码详解之ArrayList
jdk源码详解之ArrayList[updating…]方法详解remove方法 remove public E remove(int index) Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtr...原创 2019-01-16 09:22:13 · 353 阅读 · 0 评论 -
JDK源码详解之File类
JDK源码详解之File类1. 类释义2. 类方法listFiles()File[] listFiles()Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.返回一个抽象路径名数组,该数组表示由该抽象路径名表示的...原创 2018-12-08 15:13:16 · 490 阅读 · 0 评论 -
JDK源码详解之List接口
JDK源码详解之List接口【updating…】1.2. 方法boolean addAll(Collection<? extends E> c)Appends all of the elements in the specified collection to the end of this list, in the order that they are returned...原创 2018-12-08 11:09:24 · 309 阅读 · 0 评论 -
Jdk源码详解之 Iterable 接口
Jdk源码详解之Iterable 接口1. 接口释义Implementing this interface allows an object to be the target of the "foreach" statement.2. 源码package java.lang;import java.util.Iterator;import java.util.Objects;im...原创 2018-12-08 10:52:03 · 363 阅读 · 0 评论 -
Java源码阅读之System类详解
Java源码阅读之System 类详解0. 类介绍The System class contains several useful class fields and methods. It cannot be instantiated.Among the facilities provided by the System class are standard input, standard...原创 2018-12-02 20:56:10 · 926 阅读 · 0 评论 -
Java源码详解之NameValuePair
Java源码详解之NameValuePairNameValuePair仅仅是一个接口。1. 类释义/** * A name / value pair parameter used as an element of HTTP messages. * <pre> * parameter = attribute "=" value * attribu...原创 2018-11-18 08:00:54 · 1839 阅读 · 0 评论 -
Jdk源码详解之ArrayBlockingQueue类
Jdk源码详解之ArrayBlockingQueue类/** Executes the given task sometime in the future. The task may execute in a new thread or in an existing pooled thread. 在将来的某个时间执行给定的任务。任务可能会执行在一个新的进程或者在一个既存...原创 2018-10-22 09:26:15 · 327 阅读 · 0 评论 -
Jdk源码详解之ProcessBuilder类
Jdk源码详解之ProcessBuilder()类1.ProcessBuilder类2.方法简介构造器ProcessBuilder /** Constructs a process builder with the specified operating system program and arguments. 使用指定的操作系统以及参数构...原创 2018-10-21 10:23:52 · 973 阅读 · 0 评论 -
Jdk源码详解之ThreadPoolExecutor 类
Jdk源码详解之ThreadPoolExecutor 类1.类释义An ExecutorService that executes each submitted task usingone of possibly several pooled threads, normally configuredusing Executors factory methods.一个ExecutorS...原创 2018-10-20 13:09:42 · 387 阅读 · 0 评论 -
Java中Collection的总结
Set类 1.TreeSet非线程安全, 2.HashSet非线程安全,底层是HashMap,无序。Map类 1.HashMap:非线程安全,无序, 2.LinkedHashMap:非线程安全,有序List类: 1.ArrayList:非线程安全 2.LinkedList:非线程安全...原创 2018-06-07 11:36:35 · 360 阅读 · 0 评论 -
Java中==与equals方法的区别
==与equals方法的区别 1.== 01.操作符专门用来比较两个变量的值是否相等,也就是用于比较变量所对应的内存中所存储的数值是否相同,要比较两个基本类型的数据或两个引用变量是否相等,只能用 == 操作符 02.如果一个变量指向的数据是对象类型的,那么,这时候涉及了两块内存,对象本身占用一块内存(堆内存),变量也占用一块内存,例如 Objet obj = newObject(); 变量 o...原创 2018-05-27 11:45:06 · 420 阅读 · 0 评论 -
Java中的TreeSet
Java中的TreeSet1.源码如下:TreeSetA NavigableSet implementation based on a TreeMap. The elements are ordered using their natural ordering, or by a Comparator provided at set creation time, depending o...原创 2018-05-26 15:44:21 · 538 阅读 · 0 评论 -
Java中的HashMap详解
Java中的HashMapHashMap就是一个散列表,它是通过“拉链法”解决哈希冲突的。一般来说,哈希冲入有三种解决办法: 1.拉链法[用链表存储起来冲突的数据] 2.开放定址法[继续往后寻找第一个空位] 3.二次探测法[再次使用一次hash函数进行选位]...原创 2018-05-26 15:41:08 · 424 阅读 · 0 评论 -
Java中的ArrayList
Java中的ArrayList1.源码阅读:2.3.面试题4.总结底层是数组查询快,添加、删除慢。线程不安全原创 2018-05-26 15:38:48 · 286 阅读 · 0 评论 -
Java中的HashSet
Java中的HashSet1. 2. 3. 面试题 问:给定一个字符串(不一定全为字母)A及它的长度n,保证字符串中有重复字符。请设计一个高效算法,找到第一次重复出现的字符。 测试样例: &amp;amp;amp;quot;qywyer23tdd&amp;amp;amp;quot;,11 输出值:y 思考: 对于本例有好多种算法。讲解两种如下: 1.可以利用一些数据结构的属性。比如这里的HashSet。 2.我们知道,对于可打印字符有限,...原创 2018-05-26 11:19:17 · 503 阅读 · 0 评论 -
Java中的LinkedList
Java中的LinkedListLinkedList 底层是链表,查询慢,增删快 LinkedList 1.实现了List和Deque接口的双向链表。实现了所有的可选list的操作,并且允许(包括null在内的)所有元素 2.所有的操作表现的像是一个双向链表。索引列表的操作将会导致从头结点或者尾节点来遍历链表。取其谁离指定的下标更近。 【待补充】...原创 2018-05-26 10:34:20 · 288 阅读 · 0 评论