Ask Question
30 January, 00:26

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

+4
Answers (1)
  1. 30 January, 01:17
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers