Hi All,
Recently I attended an interview, the interviewer is asking a question about restricting of method access.
Q: In one class I have 3 methods (i.e. method1(), method2(), method3()), I am calling those 3 methods in same class, but I should call only first 2 method, I should restrict 3rd method, so nobody should call method3(). How can I do it ?
The interviewer gave an hint also (i.e. by using object or reference) . And at the end of interview he said answer is reference.
I was confused with his question, any body having an idea of what he is pointing to ?
Thanks, Ranjith