197 reputation
110
bio website amazon.com
location Seattle, WA
age 27
visits member for 2 years, 4 months
seen Apr 26 at 22:21

I'm really just battling for the reputation :)


Mar
9
comment Using public final rather than private getters
@Tomá┼íZato There are no setX methods on String, int, or MyObject. In the first version, final is only to ensure that methods other than the constructor within the class don't try to bar = 7;, for example. In the second version, final is necessary to prevent consumers from doing: MyObject x = new MyObject("hi", 5); x.bar = 7;.
Jan
27
awarded  Notable Question
Jun
11
awarded  Popular Question
Jan
10
comment Why would you opt to fully qualify a package instead of importing it?
+1 because I was working with two Documents (internal, and java XML based) earlier today :)
Aug
7
awarded  Informed
May
28
awarded  Nice Question
May
15
awarded  Critic
Apr
28
awarded  Custodian
Apr
28
reviewed No Action Needed Architecting Python application consisting of many small scripts
Mar
18
awarded  Scholar
Mar
18
accepted Using public final rather than private getters
Mar
18
comment Using public final rather than private getters
Great answers; I have disagreements with some of them, but I'm not sure this site is the best forum for discussion. In short, 1) I can break others by using the mutable form where they assume it's immutable (perhaps I should add final to the class in my examples), 2) I agree, 3) I would argue it's no longer a POJO in that case, 4) I agree for now, but hopefully discussions like this can change what is least astonishing :).
Mar
18
awarded  Editor
Mar
18
awarded  Student
Mar
18
revised Using public final rather than private getters
added 185 characters in body
Mar
18
asked Using public final rather than private getters
Dec
31
awarded  Autobiographer
Dec
31
awarded  Supporter