Java
Programming and Technical
Q. What are different types of access modifiers?
A. 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 sub classes in the other packages. default modifier : Can be accessed only to classes in the same package.
Read Solution (Total 1)
-
- there are four types of access modifiers in java.
1)private :it can be called as native access specifier.
2)default: it can be called as package access specifier.
3)Protected:It can be called as Inherited access Specifier.
4)Public :It can be called as Universal access Specifier - 10 years agoHelpfull: Yes(1) No(0)
Java Other Question