摘要:
我想代码是非常容易解释这个问题的了。下文会给出总结。总结点击这里或者往下阅读:直接来一段小代码吧:public class Interrupt { public static void main(String[] args) { Thread t ... 阅读全文
摘要:
嗯,对,这是我的博客。 其实我的博客就是我的笔记本,在快速学习过程中非常容易遗忘。好记性不如烂笔头,可是曾把笔记写在笔记本却很少去看,或者没有看,长篇代码又懒的抄在笔记本,到后来才写在博客。写在博客其实挺方便,有些函数什么的用法可以直接搜索,网上也有很多... 阅读全文
摘要:
以下排序算法模版都会用Comparable接口数据类型,只要实现了Comarable接口的数据类型比如Integer、Double、String和其他许多高级数据类型(如File和URL),这些数据类型的数组可以作为参数调用排序方法。这里的输入不是Scanner ci... 阅读全文
摘要:
在同步代码块中,锁对象是谁,就用那个对象来调用wait和notify为什么wait方法和notify方法需要定义在Object? 因为所有的对象都是Object的子类对象,而所欲的对象都可以当做锁对象 jdk1.5版本之前多个线程通信用synchronize... 阅读全文
摘要:
先看Demo1:public class Demo1_Synchronized { public static void main(String[] args) { final Printer p = new Printer(); n... 阅读全文
摘要:
数组In the last chapter, we looked at how the shell can manipulate strings and numbers.The data types we have looked at so far are known... 阅读全文
摘要:
奇珍异宝In this, the final chapter of our journey, we will look at some odds and ends.While we have certainly covered a lot of ground in t... 阅读全文
摘要:
字符串和数字Computer programs are all about working with data. In past chapters, we have focused onprocessing data at the file level. Howeve... 阅读全文
摘要:
流程控制:for 循环In this final chapter on flow control, we will look at another of the shell’s looping constructs.The for loop differs from ... 阅读全文
摘要:
位置参数One feature that has been missing from our programs is the ability to accept and processcommand line options and arguments. In thi... 阅读全文