I was going through primitive data types in java. It mentions that primitive values don't share state with other primitive values.
It makes sense to me but I was wondering if someone could give me an example where a data value actually share state with other data value in java. I could come up with a custom class that have static variables in it.
Naturally, instances of that class will share those static variables, hence some sort of state. But I'm looking for examples specifically showing state sharing in non-primitive data type offered by JAVA.