java synchronized on object, class and block

synchronized Blocks do have advantages over methods, most of all in flexibility because you can use other object as lock whereas syncing the method would lock the complete class. Compare: // locks the whole object … private synchronized void someInputRelatedWork() { … } private synchronized void someOutputRelatedWork() { … } Vs. // Using specific locks…

Spring componentscan custom annotation

Everyone seems to think annotations are cool and want to use them now days. A lot has been written about the pros and cons of using annotations and personally I think they should be used with caution. Mixing annotation domains to a point of total confusion, spreading configuration related meta-data across large code bases to…

target pseudo class in css3

Basically the :target pseudo selector in CSS matches when the hash in the URL and the id of an element are the same. we can define ‘:target’ for general purpose. We can also use it with other css selectors to define specific matching rules. So if we have a http://www.abc.com/index.html#myHash and in the css we have…

transition vs animation in css

CSS animation is definitely the next big step in CSS. Absolutely amazing things can be done with this. It is literally up to your imagination, as you’ll come to realize if you don’t already understand how CSS animations work. HTML5 and javascript continues to replacing what Flash was previously used for, and similarly CSS continues…