Answer:
Option (B) is the correct answer of this question.
Explanation:
In the Private access modifier we can access the property and field within the package or class we cannot accessing the member outside the class .
- We use private keyword for declaring the private access modifier.
- In the public access modifier we accessing the property outside the class so it's a incorrect option .
- In the protected access modifier we access the property of class package and subpackage both so it's a incorrect option.
- The default modifier is incorrect it not follow the given scenario so it's incorrect.