Java — Synchronization | Code Factory

public class X {
synchronized area {
wherever we are performing
update opertation (add/remove/delete/replace)
ie. where state of object changing
}
non-synchronized area {
wherever object state wouldn't
be changed like read operation
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store