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

How many types of methods are there in java?

1063


What is difference between filereader and bufferedreader?

1010


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

1134


What is reflexive association?

1872


What is arguments in java?

1056


What is remote method invocation (rmi)?

1113


Where is singleton pattern used?

1040


Is 9 a prime number?

934


Define interface in java?

1130


Is string is a data type?

992


What is the difference between post and put?

1130


Can you explain inner class.

1138


Name few "optional" classes introduced with java 8 ?

1185


how are methods defined?

1104


Is string is a keyword in java?

1031