Shri Chhatrapati Shivaji Maharaj College of Engineering
Palsons Derma Interview Questions and Answers
Q1. what is difference between overloading and overriding ?
Overloading is having multiple methods with the same name but different parameters. Overriding is having a method in child class with the same name and signature as in parent class.
Overloading is compile-time polymorphism while overriding is runtime polymorphism.
Overloading is done in the same class while overriding is done in different classes.
Overloading is used to provide different implementations of the same method while overriding is used to provide a specific implementa...read more
Q2. what do you understand by object and class ?
Object is an instance of a class that has its own set of properties and methods. A class is a blueprint for creating objects.
An object is a real-world entity with its own set of attributes and behaviors.
A class is a template or blueprint for creating objects.
Objects are created from classes using the 'new' keyword.
Classes can have properties (variables) and methods (functions).
Inheritance allows classes to inherit properties and methods from parent classes.
Polymorphism allows...read more
Q3. Write the examples of union, intersection?
Union and intersection are set operations used in mathematics and computer science.
Union combines two sets and removes duplicates
Intersection returns the common elements between two sets
Example of union: {1,2,3} union {3,4,5} = {1,2,3,4,5}
Example of intersection: {1,2,3} intersection {3,4,5} = {3}
Q4. What is trigger, Cursor?
Trigger is a database object that executes automatically in response to certain events. Cursor is a database object used to manipulate data.
Triggers are used to maintain data integrity and consistency.
Triggers can be used to audit changes made to the database.
Cursors are used to iterate through a set of rows returned by a query.
Cursors can be used to update or delete rows in a table.
Triggers and cursors are commonly used in database programming.
Q5. Write the example of encapsulation?
Encapsulation is the process of hiding implementation details and exposing only necessary information.
Encapsulation helps in achieving data abstraction and information hiding.
It allows for better control over data and prevents unauthorized access.
An example of encapsulation is a class in object-oriented programming, where the data members are private and can only be accessed through public methods.
Q6. what is inheritance?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows for code reuse and promotes code organization.
The existing class is called the parent or superclass, while the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class, and can also add its own unique properties and methods.
For example, a class Animal can be the pare...read more
Reviews
Interviews
Salaries
Users/Month