;)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

Answer is here

Jump to Post

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?

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.