Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when asub class inherits a super class and overrides a
public method of super class in sub class(public method in
super class).
why these methods needs to be public in sub class.
(otherwise compile time error).

Answer Posted / imtiyaz

The access specifier for the overriding method can allow
more but not less access than the overridden method.
For example, a protected method in the superclass can be
made public but not private

private, protected and public is Ascending order of access
modifiers depending upon the strength

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of constants?

1026


What is the method to expand and collapse nodes in a jtree?

1032


Is it possible for a yielded thread to get chance for its execution again?

923


Explain OOPs concept.

1069


How many ways can we create singleton class?

948


Why null value is used in string?

1021


How do you declare a string variable?

1005


When throws keyword is used?

983


What is the association?

962


Explain the difference between treeset and treemap in java?

957


Will minecraft java be discontinued?

1153


What is the loop in java?

1113


What is java thread dump, how can we get java thread dump of a program?

980


What is a type parameter in java?

981


What is autoboxing in java?

1046