This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
In the first code snippet, code is synchronized on object referred by someObject. So, if two(or more) threads are having same reference someObject, then only one thread at a time can enter in synchronized block.
In the second code snippet, code is synchronized on object referred by MyClass.class.
If you have any doubts regarding synchronization, I would suggest to go through link provided in previous post by Martin Vajsar.
subject: Synchronization - Static methods and Blocks