摘要: package chapter_2_listproblem; public class Problem_05_ReversePartList { public static class Node { public int value; public Node next; public Node(int data) { ... 阅读全文
posted @ 2016-07-27 20:37 澄海乌鸦 阅读(237) 评论(0) 推荐(0) 编辑
摘要: package chapter_2_listproblem; public class Problem_04_ReverseList { public static class Node { public int value; public Node next; public Node(int data) { ... 阅读全文
posted @ 2016-07-27 20:36 澄海乌鸦 阅读(455) 评论(0) 推荐(0) 编辑
摘要: package chapter_2_listproblem; public class Problem_03_RemoveNodeByRatio { public static class Node { public int value; public Node next; public Node(int data) { ... 阅读全文
posted @ 2016-07-27 20:31 澄海乌鸦 阅读(211) 评论(0) 推荐(0) 编辑
摘要: package chapter_2_listproblem; public class Problem_02_RemoveLastKthNode { public static class Node { public int value; public Node next; public Node(int data) { ... 阅读全文
posted @ 2016-07-27 20:30 澄海乌鸦 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 如果head1的值小于head2,则head1往下移动 如果head2的值小于head1,则head2往下移动 如果head1的值与head2的值相等,则打印这个值,然后head1与head2一起往下移动‘ head1或head2有任何一个移动到null,整个过程终止 阅读全文
posted @ 2016-07-27 20:23 澄海乌鸦 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 第十四章 多线程 多线程与多进程的本质区别:每个进程拥有自己的一整套变量,而线程则共享数据。共享变量使线程之间的通信比进程之间更有效、更容易。此外,在有些操作系统中,与进程相比较,线程更“轻量级”,创建、撤销一个线程比启动新进程的开销要小的多。 创建一个线程 1.将任务代码移到实现了Runnable 阅读全文
posted @ 2016-07-27 20:17 澄海乌鸦 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 集合接口 队列有两种实现方式,一种是使用循环数组;另一种使用链表。 Queue<Customer> expresslane = new CircularArrayQueue<>(100) ; expresslane.add(new Customer(“Harry)); Queue<Customer> 阅读全文
posted @ 2016-07-27 20:12 澄海乌鸦 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 第十二章 泛型程序设计 泛型程序设计意味着编写的代码可以被很多不同类型的对象所重用。 ArrayList<String> files = new ArrayList<String>() ; String filename = files.get(0) ; 使用泛型前,ArrayList使用Objec 阅读全文
posted @ 2016-07-27 20:09 澄海乌鸦 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 第十一章 异常、断言 异常分类: 所有的异常都是由Throwable继承而来,但在下一层立即分解为两个分支:Error和Exception。 Error类层次结构描述了Java运行时系统内部错误和资源耗尽错误。这种情况很少出现。 在设计Java程序时,需要关注Exception层次结构。这个层次结构 阅读全文
posted @ 2016-07-27 20:05 澄海乌鸦 阅读(186) 评论(0) 推荐(0) 编辑