Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Choosing a suitable access control modifier in Java

How to choose a Suitable Access Control specifier of a method or a field?Access Control Modifiers available for classes and members in JavaTop-level classes in Java can have only two Access Control Modifiers - public and default (package-private) whereas the members have four access control modifiers - public, protected, default (package-private), and private. Nested Classes are treated as



This post first appeared on Geek Explains: Java, J2EE, Oracle, Puzzles, And Problem Solving!, please read the originial post: here

Share the post

Choosing a suitable access control modifier in Java

×

Subscribe to Geek Explains: Java, J2ee, Oracle, Puzzles, And Problem Solving!

Get updates delivered right to your inbox!

Thank you for your subscription

×