Presents your JAVA E-NEWSLETTER for January 27, 2003 <-------------------------------------------> BETTER ENCAPSULATION THROUGH CAREFUL CODING They key to good object-oriented programming (OOP) is constructing viable objects. That's why object encapsulation problems are some of the more troublesome issues facing Java developers. Avoiding encapsulation "gotchas" is on most coder's wish lists, but sidestepping these development land mines is easier said than done. Objects should be totally self-contained to ensure that each code element is modular and reusable, as well as secure and stable within its current application. To achieve viable encapsulation, pay particular attention to these four mistake-prone areas: * Getters and setters * Immutability of return values * Clone collections * Return immutable iterators See a discussion on these four "gotchas," and get a brief outline on how to avoid the errors typically associated with them. Find out how to ensure that your Java code is OOP-optimized and fully recyclable by preventing object encapsulation deficiencies and related processing errors. http://cl.com.com/Click?q=f4-Y-0EQ0ssSxfG2K-Dpkq8MR0LmT0E ----------------------------------------