If Private Members Have To Be Accessed Directly From Outside #215
If private members have to be accessed directly from outside the class but the access specifier must not be changed, what should be done?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 OOps Access Specifiers - OOPs MCQ: Private Access Specifier - Quiz No.1.
If private members have to be accessed directly from outside the class but the access specifier must not be changed, what should be done?
Specifier must be changed
Friend function should be used
Other public members should be used
It is not possible