Comment on Why Is Object-Oriented Programming Useful? With a Role-Playing Game ExampleparentComments−Gurkenmaster11yIf OOP encourages mutation can you explain to me why the String class in java is immutable?−bsder11yIt's a holdover from when Java was supposed to be a language for small machines.However, if you're being snide, let me retort "So why does everybody in Java immediately recommend that you use the StringBuilder class instead of String?"
Comments
If OOP encourages mutation can you explain to me why the String class in java is immutable?
It's a holdover from when Java was supposed to be a language for small machines.
However, if you're being snide, let me retort "So why does everybody in Java immediately recommend that you use the StringBuilder class instead of String?"