- Do not synchronize an instance variable or a code block without an object – it is illegal in Java
- a synchronized context: wait(), notifyAll() – may be required to be called
- Do not add a checked exception to an overridden method
- A superclass does not have to be serializable, but its constructor will run when a serializable subclass instance is deserialized.
- Loose coupling: you can change the implementation of a class without affecting the other classes. For example, if two classes say A and B – do not use each other at all (no instantiation of the other or no method calling ), they are not coupled. If A uses B but B does not use A, then they are loosely coupled. If both A and B use each other, then they are tightly coupled.Loose coupling expects that a class should keep its members private and that the other class should access themthrough getters and setters
From: http://sitestree.com/?p=4910
Categories:Java Short Notes
Tags:
Post Data:2010-02-08 12:34:16
Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada