Access Modifier
Whenever we are writing our own classes we have to provide some information about our class to JVM like:-
- whether this class can be accessible from anywhere or not?
- Whether child class creation is possible or not?
- Whether the object creation is possible or not?
We can answer these questions by using an appropriate modifier.