Posted By:
Joe_Cheng
Posted On:
Wednesday, October 2, 2002 07:42 AM
They are not necessary unless you are working within some type of framework that expects them (yes, this includes JavaBeans, EJB, Struts, and others...).
However, I think most people would agree it is a very good idea to follow these conventions. Some of the smarter IDE's will automatically generate get/set methods for you, and recognize that get/set methods are related. Furthermore, if at some point you find yourself introspecting (say, for logging or debug purposes) you'll be able to leverage tools like Jakarta's BeanUtil.