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

Are arrays static in java?

1047


What is a double?

1091


Can we assign the reference to this variable?

964


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

1233


How do you compare objects in java?

941


Is char * a string?

985


What is the exception hierarchy in java?

952


What is the size of integer?

1092


Name four container classes.

984


Which collection is thread safe in java?

985


Which non-unicode letter characters may be used as the first character of an identifier?

1006


What is collection class in java? List down its methods and interfaces.

951


What does singleton mean in java?

995


What is the collections api?

1052


What is difference between static class and singleton pattern?

1021