how to tell if a class is immutable by JavaDOC?

1

I wonder if, how, by JavaDOC know whether a class is immutable or not. Is there any field in JavDOC for quick reference since I am using several classes and I do not have much contact with the language. I would like the answer and, if possible, an image. Thank you.     I'm working with shapes. It would be nice if this class were used as an example.

    
asked by anonymous 30.06.2017 / 16:12

1 answer

1

You should look at whether the constructor is private, it is generally recommended to use it privately and create a public method of () that returns a new object. If it has setters, if it does not have it, you will not be able to change the values.

    
30.06.2017 / 16:27