If a variable is declared as private, where may the variable be accessed
A private variable may only be accessed within the class in which it is declared. In Java, if a variable is declared as private, it can only be accessed within the same class. Private access modifier restricts access to the members (variables or methods) to the class in which they are declared. This means that … Read more