let's say you have a abstract class and it will be inherited by some other classes in the same package, here is a abstract function that all extended class should have to make it work .As you can read from the following example, all vehicles should have mechanism to speedup and slow down , however, speedup and slowdown are two "internal" mechanisms, which each type of vehicle may carry differnet public function to trigger speedup or slowdown, such as applyMoreGas() for car, peddleFaster() for bi
No, protected is mainly for visiblity in subclasses, although it's also visible in the same package. For visibility in the same package only, use default or no descriptor. If you are developing an API package, there is a huge difference between default and protected restriction. Default or private is internal to the package and thus can be easily changed later on. protected and public are exposed signature and "committed" to outside world. They need careful design and any later change may be co