;)Suppose a method is called with formal parameters of supertype and (1)the actual parameters of subtype; Now the method declaration is (2)overridden and overloaded in the (3)previous same class as well as in the (4)overriding subclass.
:icon_rolleyes:An object reference is used on which the call is performed; Here the reference is of the previous same overridden superclass but it denoets the object of the overriding subclass. :icon_exclaim:Which method will be called

  • if only (1) is activated?
  • if (1) & (2) are activated?
  • if (1) , (2) & (3) are activated?
  • if (1) , (2) , (3) & (4) all are activated?

:?:

Recommended Answers

All 4 Replies

Answer is here

A small correction that was ommited previously ~

Suppose a method is called with formal parameters of supertype and (1)the actual parameters of subtype; Now the method declaration is (2)overridden and overloaded with formal parameters of that subtype in the (3)previous same class as well as in the (4)overriding subclass.
An object reference is used on which the call is performed; Here the reference is of the previous same overridden superclass but it denoets the object of the overriding subclass. Which method will be called
if only (1) is activated?
if (1) & (2) are activated?
if (1) , (2) & (3) are activated?
if (1) , (2) , (3) & (4) all are activated?

Correct all you want - Peter Budo's post still stands. Did you read it?

After 4 days still no attempt made to show any work in regards of this, therefore thread closed.
We are NOT 24/7 coding service for lazy people.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.