摘要:
编写具有多线程能力的程序经常会用到的方法有:
run(), start(), wait(), notify(), notifyall(), sleep(), yield(), join()
还有一个重要的关键字:synchronized
本文将对以上内容进行讲解。
一:run() 和start()
示例1:
public class threadte......
摘要:
page 3 of 4
......
准备SCJP的时候做的一些笔记
准备scjp的时候做的一些笔记
摘要:
比较原始类型的相等与比较两个对象相等是不同的。如果数值5存放在两个不同的int变量中,比较两个变量是否相等将产生结果为 boolean 值 true:
public class testintcomparison {
public static void main(string[] args) {
int x = 5, y = 5;
system.out.printl......