Java JMF – Load and Play Media File


Java – Synchronized HashMap Example

HashMap is a non-synchronized collection class. If we need to perform thread-safe operations on it then we must need to synchronize it explicitly.

Iterator should be used in a synchronized block even if we have synchronized the HashMap explicitly.


Java – Calculate Difference Between Two Dates Using Joda Time

Take a look @ Joda-Time FAQ

You can use a PeriodFormatter to get the format of your choice.

Try the following sample code.