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...

can we access the super class method using subclass object?

Answer Posted / naveen kumar t

If A is the super class and B is the subclass
inside subclass :
A a = new B();
a.methodA();

Here the methodA() should not be private.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which java ide is used the most?

1011


What is void keyword?

1107


What do you mean by JVM?

1083


What was java originally called?

962


What is size of int in java?

1062


What is console based application in java?

1045


What is a buffer in java?

1037


Which access specifier can be used with class ?

1003


What are basic keywords?

1043


What is main string [] args?

994


What is double in java?

990


How do you replace all in word?

1069


Why strings in java are called as immutable?

993


How many classes can any class inherit java?

972


Can you achieve runtime polymorphism by data members?

1150