When use private, public please answer,?
When we want our data or methods not to be accessed by any class then we use private
To be used by child classes then use protected
To used by any class with within package then it is default specifier
To be used by any class outside the package also then use public