Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Interview Questions and Answers|
|Ans. By encapsulating it within another class and declaring it private. In such a case, it will only be accessible through parent class or parent class object.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  private class   private inner class  class hiding  encapsulation  object oriented programming (oops)  oops concepts  inner classes   nested classes|
|Can we declare a class private ?|