WHAT ARE DIFFERENT TYPES OF ACCESS MODIFIERS

Pushpendra Singh

Total Post:0

Points:0
Posted by  Pushpendra Singh
Java 
 1115  View(s)
Ratings:
Rate this:
  1. Pushpendra Singh

    Post:240

    Points:1200
    What are different types of access modifiers

    Public: Any thing declared as public can be accessed from anywhere.

    Private: Any thing declared as private can’t be seen outside of its class.

    Protected: Any thing declared as protected can be accessed by classes in the same package and subclasses in the other packages.

    Default modifier : Can be accessed only to classes in the same package.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!