Suns Java style rules specify that accessors should follow the getX/setX pattern, and most Java API mathods follow this...
except for some very common exceptions such as:
String length()
enum name() [NB new to 1.5, not a legacy!]
ArrayList size()
etc
It seems that there is another pattern operating here: methods that access a private field which will never be set from outside the class are simply named after the field.
Has anyone seen this documented? Is there some other explanation?
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
kvprajapati 1,826 Posting Genius Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
kvprajapati 1,826 Posting Genius Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
kvprajapati 1,826 Posting Genius Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.