Static Method Synchronization
What happens when you try to synchronize on a static method? When a static synchronized method is called, which object are we referring to? A static method does not have a notion of a this reference. It is not possible to obtain a lock on an object that does not exist.
Hashcodes in Java
What happens if two different object hash to the same hashcode and then are placed in a HashMap?
Method Synchronization
In Java, access to shared resources can be controlled by using synchronized methods. An instance method is declared to be a synchronized method by adding the modifier synchronized to its declaration. For example:
How to SSH without using a Password
The basis of using ssh without typing your password is public key based authentication. You need to generate a pair of public/private keys for this.