posted @ 2014-08-26 18:40 chayu3 阅读(327) 评论(0) 推荐(0) 编辑
摘要:
Parent interface of Collection: Iterable InterfaceA class that implements theIterablecan be used with the new for-loop.TheIterableinterface has only o... 阅读全文
摘要:
An index is used to speed up searching in the database.By default, when you create this table, your data will be stored on disk and sorted by the "Id"... 阅读全文
posted @ 2014-08-25 21:20 chayu3 阅读(162) 评论(0) 推荐(0) 编辑
摘要:
1, LinkedListcomposed of one and one Node: [data][next].[head] ->[data][next] ->[data][next] ->[data][next] -> [null].Empty linkedList: head == null.V... 阅读全文
posted @ 2014-08-21 22:11 chayu3 阅读(126) 评论(0) 推荐(0) 编辑
摘要:
1, Binary SearchOn sorted array!public static int binarySearch(int e, int[] array, int low, int high) { while(low array[mid] && e array[low]) ... 阅读全文
posted @ 2014-08-21 21:58 chayu3 阅读(95) 评论(0) 推荐(0) 编辑
摘要:
Time complexity:Binary search O(log2 n):i=0. n elements: -------------------i=1. n/2 elements: ----------i=2. n/4 elements: ... 阅读全文
posted @ 2014-08-21 21:51 chayu3 阅读(201) 评论(0) 推荐(0) 编辑
摘要:
1, Process&ThreadsMost implementations of the Java virtual machine run as a single process.Threads exist within a process — every process has at least... 阅读全文
posted @ 2014-08-19 22:42 chayu3 阅读(296) 评论(0) 推荐(0) 编辑
摘要:
For every type of object, the Java virtual machine instantiates an immutable instance ofjava.lang.Classwhich provides methods to examine the runtime p... 阅读全文
posted @ 2014-08-13 23:43 chayu3 阅读(94) 评论(0) 推荐(0) 编辑
摘要:
除了Java collection class/interface外,方便的有Google guava的utility class: Lists/Sets/Maps/Queues, 用它们可以方便地创建List等object。List list = Lists.newArrayList(); or ... 阅读全文
posted @ 2014-08-13 22:43 chayu3 阅读(193) 评论(0) 推荐(0) 编辑