Home / Questions / If a variable is declared as private, where may the variable be accessed?
Explanatory Question

If a variable is declared as private, where may the variable be accessed?

👁 967 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

A private variable may only be accessed within the class in which it is declared.