Tagged articles
getter
10 articles · Page 1 of 1
This tutorial walks through Java member methods, covering return statement syntax, proper use of getters and setters, the static modifier for class members, and the final keyword for classes, variables, and methods, with concrete code examples and explanations.
FinalJavafundamentals
0 likes · 12 min read

This article explains the purpose, usage, and advantages of PHP getters and setters, provides clear code examples for both, and demonstrates a combined implementation that validates and secures private properties, helping developers write more robust and maintainable code.
OOPPHPdata encapsulation
0 likes · 5 min read

This guide explains PHP getters and setters, detailing their purpose, implementation, and advantages, and provides comprehensive code examples that demonstrate how to validate and control access to private properties for safer, more reliable object-oriented programming.
data validationgetterobject-oriented
0 likes · 6 min read

This article explains why calling i18n translation directly in enum definitions fails due to initialization order, and shows how using JavaScript getters—along with Vue computed analogies and accessor property principles—provides a clean, dynamic solution and other practical use cases.
JavaScriptVuecomputed
0 likes · 5 min read

This article explains the purpose, implementation, and benefits of getters and setters in PHP, providing clear code examples that demonstrate how to encapsulate validation logic for private properties to improve data safety and object reliability.
getterobject-orientedsetter
0 likes · 6 min read

During a recent iteration, adding a simple log statement triggered a system exception because Fastjson automatically invoked a custom getter that returned null, leading to an NPE; the article details the root cause, the serialization process, and practical solutions to prevent similar issues.
BackendFastjsonJava
0 likes · 11 min read

This article explains how Python’s @property decorator transforms class methods into attribute-like accessors, covering basic usage, setter/getter patterns, error handling, and practical examples such as score validation and temperature conversion, helping developers write cleaner, more encapsulated code.
DecoratorPropertyPython
0 likes · 8 min read

This tutorial explains the benefits of using Python properties, introduces decorator functions, and provides step‑by‑step examples of defining @property getter, setter, and deleter methods to create clean, readable, and maintainable class interfaces.
DecoratorPropertygetter
0 likes · 11 min read

This article explains the internal mechanism of Vuex by analyzing how state and getter values are injected into Vue components, how they stay reactive through Vue's data system, and how a central event bus can be used for component communication, providing code examples and source‑code analysis.
StateVuexcomponent communication
0 likes · 9 min read

This article explains the purpose, syntax, parameters, and return value of Python's property() function, demonstrates how to define getter, setter, and deleter methods both directly and via decorators, and provides additional examples and related built‑in attribute functions.
OOPPropertyPython
0 likes · 5 min read
