Tagged articles

Access Modifiers

7 articles · Page 1 of 1
Lisa Notes
Lisa Notes
Mar 30, 2026 · Fundamentals

Understanding Java Access Modifiers: Essential for Cross‑Platform OOP Development

This article explains Java's four access modifiers—public, protected, default (friendly), and private—detailing their visibility rules, typical use cases, and the file‑naming constraints that ensure proper encapsulation in cross‑platform object‑oriented programs.

Access ModifiersEncapsulationProgramming Fundamentals
0 likes · 4 min read
Understanding Java Access Modifiers: Essential for Cross‑Platform OOP Development
php Courses
php Courses
Sep 28, 2023 · Backend Development

Understanding Encapsulation in PHP: Benefits, Code Examples, and Best Practices

Encapsulation, a core OOP principle, is explored in PHP with explanations of its benefits for data protection and modular code, followed by practical class examples—including a Person class and a BankAccount class—plus best‑practice recommendations for using access modifiers effectively.

Access ModifiersBackend DevelopmentEncapsulation
0 likes · 5 min read
Understanding Encapsulation in PHP: Benefits, Code Examples, and Best Practices
FunTester
FunTester
Oct 9, 2020 · Backend Development

Why Does My Groovy Object’s toString Return Empty? A Debugging Tale

The article explains a puzzling bug where a Groovy‑created object's toString becomes empty after fastjson serialization, traces the issue to Java access modifiers, demonstrates the problem with sample code and console output, and resolves it by adding a public modifier.

Access ModifiersFastJSONGroovy
0 likes · 3 min read
Why Does My Groovy Object’s toString Return Empty? A Debugging Tale
Big Data Technology & Architecture
Big Data Technology & Architecture
Mar 9, 2019 · Fundamentals

Scala Access Modifiers: private, protected, and public

This article explains Scala's access modifiers—private, protected, and public—including their default visibility, stricter rules compared to Java, scoped protection syntax, and multiple code examples illustrating how these modifiers affect member accessibility in nested and package structures.

Access ModifiersPrivateProgramming Fundamentals
0 likes · 5 min read
Scala Access Modifiers: private, protected, and public
Java Captain
Java Captain
Apr 13, 2018 · Fundamentals

Understanding Encapsulation and Interfaces in Java

This article explains Java encapsulation and interfaces, illustrating how access modifiers like public and private control object members, improve usability and safety, and provides a complete code example with a Human class, usage guidelines, and a practical exercise.

Access ModifiersEncapsulationProgramming Fundamentals
0 likes · 7 min read
Understanding Encapsulation and Interfaces in Java