Question
Consider a Shape class with a method draw(), and Circle
and Rectangle classes that inherit from Shape and override draw(). If you have a List containing Circle and Rectangle objects, calling draw() on each element demonstrates:Solution
This is a classic example of runtime polymorphism. Even though the list holds references of type Shape, when draw() is called, the specific draw() method of the actual object (either Circle or Rectangle) is executed. The same method call (draw()) behaves differently based on the object's type.
What is the minimum and maximum tenure for a Certificate of Deposit (CD)?
Netaji Subhas National Institute of Sports is situated in______.
Which country has won the historic double Gold Medal at the “45th Chess Olympiad” played in Hungary?
According to the UN department of economic and social affairs data, ______ had the largest diaspora in the world by the end of 2020.
'Golden Revolution' is related to ________.
The layer of earth that separates the crust from the core is:
  Professor Harsh Kumar Jain has been appointed as the new Ambassador of India to which country?
On which of the following dates Chandrayaan-3 was successfully launched?
Legal Entity Identifier (LEI) is the wholly subsidiary of which organization?
PQ and RS are chords on a circle centred at O. Suppose A is the point of intersection of PQ and RS. Which of the following statements is/are correct?