Specifically, Java passes object references by value.
* The above article includes a reference to an article explaining C++ Reference Variables, a good explanation of the general concept of reference variables.
Exploring Java: Threads
* What is a daemon thread? When should I use setDaemon() and why?
thread.setDaemon(true)to tell the JVM to make the thread a daemon thread.
According to Webster's, a daemon (variant of demon) is an attendant power or spirit. Daemon threads are typically used to perform services for your application/applet (such as loading the "fiddley bits"). The core difference between user threads and daemon threads is that the JVM will only shut down a program when all user threads have terminated. Daemon threads are terminated by the JVM when there are no longer any user threads running, including the main thread of execution. Use daemons as the minions they are.
[In short: daemon threads do not keep the program from quitting; user threads keep the program from quitting. -Alex]
Synchronized block vs. method:
The only real difference is that a synchronized block can choose which object it synchronizes on. A synchronized method can only use- http://stackoverflow.com/questions/574240/synchronized-block-vs-synchronized-method/574253#574253
'this'(or the corresponding Class instance for a synchronized class method).