Ask Question

Which access modifier explicitly says that a method or variable of an object can be accessed by code from outside of the class of that object?

(A) private

(B) public

(C) default

(D) static

+2
Answers (1)
  1. 27 February, 04:20
    0
    B

    Explanation:

    public access specifier is used to access the objects outside the class. if it is private we can not access that outside the class. Public is useful when you want to expose some data which is useful to the user and private is used to hide the confidential data from the user
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which access modifier explicitly says that a method or variable of an object can be accessed by code from outside of the class of that ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers