Ask Question
23 June, 04:59

Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?

a) Public

b) Protected

c) No Modifier

d) All of the mentioned

+1
Answers (1)
  1. 23 June, 06:09
    0
    D) All the mentioned

    Explanation:

    public: This access modifier allows access from all classes in the program

    protected: Means only classes within the same package or sub-classes (inheritance) can access members of the class

    No Modifier: Omiting the modifier sets a class to the default. Which implies only classes in the same package can access members of the class.

    The given question refers to class members in the same package so any these three access modifiers can be used.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package? a) ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers