I have a `HashMap` and want to synchronize each row/entry separately in order to maximize concurrency, so in this way many threads can access the `HashMap` at the same time but no two threads or more can access the same row/entry at the same time.

I did the following in my code but I'm not sure if it's correct or not:

```
/* Lock/synchronize the data to this key, (skey is a key of type String) */
synchronized (aHashMap.get(skey)) {

    /* write the data (data is Integer) */
    aHashMap.put(skey, data);

}

```