Menu

Java learning Series | Day-5 Acces Modifier.
📰

Java learning Series | Day-5 Acces Modifier.

DEV Community: java·Ajay·5 days ago
#aokN8wu8
#devtojava#devto#dev#name#salary
Reading 0:00
15s threshold

What is Access modifier?

Access modifier are the reserved keyword in object-oriented programming that control the visibility and scope of the class method and variables. They are core tools used to enforce encapsulation (hiding internal data and state) and abstraction (exposing only necessary functionality).

Public(public) ---> Accessible any where in the application(all packages and classes).

private(private) ---> Accessible only within the class members.

Protected(protected) ---> Accessible within the same class, same package, and by subclasses in different packages.

Default(no keyword) ---> If no access modifier is specified, this means only classes within the same package can access it.

What is POJO?

POJO stands for Plain Old Java Object.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.