Start learning 50% faster. Sign in now
Polymorphism allows one interface to represent multiple implementations . This can occur through method overriding , where a subclass provides a specific implementation for a method declared in its parent class, or method overloading , where methods have the same name but different parameters. For instance, an Animal class might have a sound() method overridden in subclasses like Dog or Cat to produce specific sounds. Polymorphism enables flexibility and extensibility, as the same method can be applied differently based on the object. Why Other Options Are Incorrect : 2. A class that inherits properties from another class : This is Inheritance , not Polymorphism. 3. A class that uses another class as a part of its definition : This describes Composition , where objects are combined to form complex systems. 4. A way to restrict access to certain class members : This is Encapsulation , not Polymorphism. 5. A way of dividing a complex system into smaller components : This is closer to the concept of Modularization , unrelated to Polymorphism.
In which of the following cases the Supreme Court, while laying out the ‘basic structure’ of the Constitution held that the democratic character of ...
Rajendra I was the son of which of the following Chola kings?
Consider the following statements about Booker Prize 2020.
(1) Douglas Stuart's won this award.
(2) He received this award for his no...
Who among the following has written the biography of Buddha, Buddhacharita?
Which microorganism among the following causes Cholera?
How many fundamental duties are listed in the Indian Constitution?
Saikhom Mirabai Chanu is an _______ .
‘La Liga’ title is associated with _______.
The government deficit can be reduced by ______ taxes or _____ expenditure.
The Mansabdari system introduced by Akbar was borrowed from the system followed in ________.