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.
In a code language, SOLUTIONS is written as '60’ and GIRAFFE is written as '15'. How will PENGUIN be written in that language?

Two different positions of the same dice are shown, the six faces of which are numbered from 1 to 6. Select the number that will be on the face opposite...
Four different positions of the same dice are shown. Select the letter that will be on the face opposite to the face having the letter B.

Six numbers 6, 7, 8, 9, 5, and 4 are written on different faces of a dice. Two positions of this dice are shown in the figures below. Find the number o...
- A cube is formed by folding the sheet. Which letter would be on the face opposite to 'N'?
Two different positions of the same dice are shown. When 'S' is at the bottom then which letter will be at the top?
A cube is formed by folding the sheet. Which letter would be on the face opposite to 'A'?Â
Two positions of the same dice, having face numbered as 1, 5, 6, 7, 8, 9, are given. What will be the product of number opposite to both ‘7’ and �...