This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.