tag:blogger.com,1999:blog-8604089320004743712.comments2023-05-23T04:27:36.813-07:00My WikiAnonymoushttp://www.blogger.com/profile/12338513120165352543noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8604089320004743712.post-69327485414250058292020-06-12T20:07:51.384-07:002020-06-12T20:07:51.384-07:00I really love your article a lot it is just amazin...I really love your article a lot it is just amazing<br /><br /><br /><br /><br /><br /><br /><a href="https://www.acte.in/angular-js-training-in-chennai" rel="nofollow"> AngularJS training in chennai </a> | <a href="https://www.acte.in/angular-js-training-in-annanagar" rel="nofollow"> AngularJS training in anna nagar</a> | <a href="https://www.acte.in/angular-js-training-in-omr" rel="nofollow"> AngularJS training in omr</a> | <a href="https://www.acte.in/angular-js-training-in-porur" rel="nofollow"> AngularJS training in porur</a> | <a href="https://www.acte.in/angular-js-training-in-tambaram" rel="nofollow">AngularJS training in tambaram</a> | <a href="https://www.acte.in/angular-js-training-in-velachery" rel="nofollow"> AngularJS training in velachery</a><br /><br /><br /><br /><br /><br />latchu kannanhttps://www.blogger.com/profile/07813137796721762375noreply@blogger.comtag:blogger.com,1999:blog-8604089320004743712.post-64868641145118582172019-04-16T02:29:19.139-07:002019-04-16T02:29:19.139-07:00Thanks for publishing this blog, really awesome. I...Thanks for publishing this blog, really awesome. Its help me to clarify my doubts well.<br /><a href="https://www.fita.in/c-c-training-in-chennai/" rel="nofollow">C C++ Training in Chennai</a><br /><a href="https://www.fita.in/c-c-training-in-chennai/" rel="nofollow">c++ course</a><br /><a href="https://www.fita.in/c-c-training-in-chennai/" rel="nofollow">c++ class</a><br /><a href="https://www.fita.in/c-c-training-in-chennai/" rel="nofollow">c c++ course fee</a><br /><a href="https://www.fita.in/jmeter-training-in-chennai/" rel="nofollow">JMeter Training in Chennai</a><br /><a href="https://www.fita.in/appium-training-in-chennai/" rel="nofollow">Appium Training in Chennai</a><br /><a href="https://www.fita.in/javascript-training-in-chennai/" rel="nofollow">javascript training in chennai</a><br /><a href="https://www.fita.in/core-java-training-in-chennai/" rel="nofollow">core java training in chennai</a>velrajhttps://www.blogger.com/profile/10314021258868841067noreply@blogger.comtag:blogger.com,1999:blog-8604089320004743712.post-79214585169310067762014-02-04T23:46:26.585-08:002014-02-04T23:46:26.585-08:00Although I agree with you about the importance of ...Although I agree with you about the importance of "encapsulation" and other object oriented design principles, you are wrong about a few points.<br /><br />You said: "Getters and Setters allow you to manipulate the internal state of objects from outside of the object."<br /><br />Primitives and String objects are immutable, and so can other complex types be. So leaking them does not, cannot, change the internal state of the object. Also mind that one can always return an unmodifiable view of an internal state. Consider Arrays.asList() and Collections.unmodifiableXXX().<br /><br />You said: "You can only specify methods, not fields, in an interface."<br /><br />That is wrong too, at least when it comes to static fields.<br /><br />And about your example, the Person class. I feel he should have a setName() and even a setSSN() method, if they are declared protected.<br /><br />People usually go crazy about encapsulation, forgetting that if you do not explicitly ban inheritance by putting in the final keyword in the class declaration (preferred) or make his only constructor private, then anyone can subclass your type. And then what? A Homeless class that extends Person might not have a SSN! =)Martin Anderssonhttps://www.blogger.com/profile/05169744365180959147noreply@blogger.comtag:blogger.com,1999:blog-8604089320004743712.post-48122933440690190882014-02-04T23:43:43.074-08:002014-02-04T23:43:43.074-08:00This comment has been removed by the author.Martin Anderssonhttps://www.blogger.com/profile/05169744365180959147noreply@blogger.com