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 / sushila

if super class method is public, then override method should
be public.

override method will take same access specifier or expanded one.

the order of access specifier is
private > default > protected > public

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is t in parametric equations?

942


List some important characteristics on jre

1030


What is a copy constructor in java?

1048


Can we clone singleton object in java?

966


How do you add an arraylist to an array in java?

930


which pattern is default in scanner package?

2186


How to obtain a performance profile of java program

952


What is covariant return type?

1057


What is subsequence of a string?

1035


What is an off by one error in java?

896


What is equals method in java?

978


Can we restart a thread already started in java?

1047


What is externalizable interface?

1054


What is the symbol for space?

929


what is difference betweem home interface and remote interface?

2564