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

Why is singleton not thread safe?

1032


What does the “static” keyword mean?

1085


Explain the term virtual machine?

1032


What is the biggest integer?

1032


How list contains works in java?

971


What do you mean by platform independence?

1033


What is a singleton in genetics?

1041


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

917


Write a program to show whether a graph is a tree or not using adjacency matrix.

1081


How do you reverse sort in java?

932


What is stringjoiner ?

944


Why are global variables used?

994


What is the use of arraylist class in java?

1058


Which class is the superclass for all the classes?

1012


Does java initialize arrays to zero?

1016