top of page

Access Modifiers in Java

Writer's picture: Div PatelDiv Patel

Java uses access modifiers to determine which parts of the code can be accessible to any other part of the code or any user or members. This provides increased security to sensitive code.


There are 4 access modifiers in java:

  1. Public

  2. Protected

  3. Default

  4. Private


Here is a chart that shows the difference between these access modifiers:


18 views0 comments

Recent Posts

See All

Battle of the Backends: Java vs Node.js

Comparing Java and Node.js involves contrasting two distinct platforms commonly used in backend development. Here’s a breakdown of their...

Comments


bottom of page