Thread safety

Imagine an application using thousands of mutable String objects and dealing with thread-safety code. Fortunately, in this case, our imagined scenario will not become a reality, thanks to immutability. Any immutable object is thread-safe by its nature. This means that strings can be shared and manipulated by multiple threads, with no risk of corruption and inconsistency.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset