One of the biggest confusion in Java programming language is whether it’s Pass by Value or Pass by Reference. I ask this question a lot in interviews and still see interviewee confused with it. So I thought to write a post about it to clarify all the confusions around it.First ...【阅读全文】
Sometime back I wrote a couple of posts about Java Garbage Collection and Java is Pass by Value, after that I got a lot of emails to explain about Java Heap Memory, Java Stack Memory and what are the differences between them.You will see a lot of reference to Heap...【阅读全文】
四.Java多线程的阻塞状态与线程控制上文已经提到Java阻塞的几种具体类型。下面分别看下引起Java线程阻塞的主要方法。1.join()join —— 让一个线程等待另一个线程完成才继续执行。如A线程线程执行体中调用B线程的join()方法,则A线程被阻塞,知道B线程执行完为止,A才能得以继续执行。public class Thread...【阅读全文】