Question
Which of the following best illustrates the concept of
polymorphism in Object-Oriented Programming (OOP)?Solution
Polymorphism in OOP refers to the ability of a function, method, or object to take on multiple forms. This characteristic allows developers to design interfaces or methods that can perform different tasks based on context. 1. Method Overloading: One of the primary examples of polymorphism is method overloading, where multiple methods share the same name but differ in argument types or counts. 2. Dynamic Behavior: Polymorphism also enables dynamic method invocation at runtime, allowing a subclass to provide a specific implementation for a method defined in its superclass. 3. Extensibility: By allowing objects to process different behaviors through a unified interface, polymorphism enhances code flexibility and scalability. Why Other Options Are Incorrect: • B) A class inheriting properties: This describes inheritance, not polymorphism. • C) Combining multiple objects: This relates to composition, which involves creating a complex object from simpler ones. • D) Restricting access: This refers to encapsulation, which controls data accessibility within a class. • E) Relationships between objects: This describes association or aggregation, not polymorphism.
Lokayukta is a _____________
Who grants certificate of commencement of business to a depository?
Under the Water (Prevention and Control of Pollution) Act, 1974, who has the power to appoint Pollution Control Boards in states?
According to Section 8(1), if no sum is expressed to which a fine may extend, what is the limitation on the amount of fine?Â
Who is considered as the Union Executive and the Head of the State as per the Indian Constitution?
The fundamental rights of the Indian Constitution are:
As expressly mentioned in the definition of evidence under S.3 of the Indian Evidence Act, 1872, evidence means and includes-
An agreement enforceable at law is a_______________________
As per S.8 of the Indian Evidence Act, 1872 which of the following is covered?
Which is correct about schedules of the Constitution and their amendment?