Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

Whether the outer class directly access private members in a Java-based application?

Asked by Aalap Prabhakaran Mar 19, 2024 1.4K views 1 answer
Share

About this question

 I am currently engaged in a particular task that is related to designing or creating a Java-based application in which I have an outer class and an inner class. The inner class has private members such as variables and methods. Discuss for me whether the outer class can directly access these private members of the inner class and explain the concept of encapsulation in this context. 

Your answer

1 Answer

More Java discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Java Blogs

Guides, tips and career advice on Java from JanBask experts.