Is it a good programming practice to not use getters and setters in trivial parts of code?
artur7 0 Newbie Poster
Recommended Answers
Jump to PostIMO the greatest advantage of getters and setters is that there is only one place in the entire program that accesses the class variable. If something has to be changed than you can change is in only one spot instead of hundres of places throught the program. Make the variables …
Jump to PostWas there a question or comment? I think you should use more parentheses for clarity
if ( (cached >= 0 && cached < 1000) || (cached < 0 && cached > -1000) )//
All 7 Replies
Fbody 682 Posting Maven Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
artur7 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mrnutty 761 Senior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mrnutty 761 Senior 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.