I encountered the following question in the Rules Roundup. (#333)TRUE or FALSE: an overriding method can change the access modifier from default to protected. Answer: TRUE Since the protected modifier is less restrictive than default, an overriding method is allowed to make that change.
MY understanding that is when we override methods, we cannot make the overriding method more restricted. Isn't Protected more restrictive than Default, which i assume is Friendly or Package. -Hemanth
friendly is more restrictive than protected because it dooes not allow access outside the package. Protedted features are allowed access outside the package provided that the overriding method is in a subclass of the base class..
Hope it helps Sagar
subject: Confusing question in the Rules roundup game of JavaRanch