12 ms·
It allows you to do this: synchronised(bob.intern()) { //This block executes in parallel for requests with different values of bob, but sequentially for ea
by Andaith 4y ago
It allows you to do this:
synchronised(bob.intern()) {
//This block executes in parallel for requests with different values of bob, but sequentially for each request that has the same value of bob.
}
If I didn't have to integrate with a weird 3rd party API where this was necessary, I wouldn't know about String.intern()...