shiva kore wrote:
I am a beginner to java coding just thinking is it possible to write our own locking technique or not.
Well, wouldn't that really depend on what you are trying to do? If you want to have some code that does some sort of locking, then take a look at the classes in the java.util.concurrent package. There are lots of different types of synchronization mechanisms there -- perhaps you can add to it, or use them as the basis for your own locking mechanism.
If you are trying to modify the synchronize keyword to do something else (ie. change the Java language structure), as other has stated, it will probably be a bit too much for a beginner...
Henry