Capgemini Interview Question

What are types of polymorphism

Interview Answer

Anonymous

Apr 15, 2024

Here are the four main pillars of Object-Oriented Programming (OOP) in Java: Abstraction: Abstraction is the process of hiding the implementation details and showing only the relevant information to the user. This makes the code easier to understand and maintain. Encapsulation: Encapsulation is the process of binding data and methods together into a single unit, called a class. This helps to protect the data from unauthorized access and modification. Inheritance: Inheritance is the process of creating a new class that inherits the properties and methods of an existing class. This allows for code reuse and makes it easier to create complex programs. Polymorphism: Polymorphism is the ability of an object to take on many forms. This means that an object can be used in different ways, depending on the context in which it is used.