3 ms·
The bean convention doesn't help you with that one though; if you have private Date date; public Date getDate() {return date;} then people can still do getDate(
by lmm 13y ago
The bean convention doesn't help you with that one though; if you have private Date date; public Date getDate() {return date;} then people can still do getDate().setTime(1);
- cdmckay 13y agoYeah, but with a getter you can make getDate return a copy of the Date object to enforce immutability.