Volkswagen Group Technology Solution
Sun Pharmaceutical Industries Interview Questions and Answers
Q1. What is garbage collector and his class
Garbage collector is an automatic memory management system that frees up memory occupied by objects that are no longer in use.
Garbage collector is a part of the runtime environment of a programming language.
It automatically identifies and frees up memory that is no longer being used by the program.
There are different types of garbage collectors such as mark-and-sweep, reference counting, and generational garbage collectors.
Java has a garbage collector that runs in the backgro...read more
Q2. Q3. Coding to Reverse the string by words .
Code to reverse a string by words
Split the string into words using space as delimiter
Reverse the order of words
Join the words using space as delimiter
Q3. Whats is dbms and what are joins?
DBMS stands for Database Management System. Joins are used to combine rows from two or more tables based on a related column between them.
DBMS is a software that manages databases, allowing users to interact with the data stored in them.
Joins are used in SQL queries to combine data from multiple tables based on a related column.
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Q4. Whats are oops and tell some exmaples
OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
OOPs focuses on creating objects that contain data and methods to manipulate that data.
Encapsulation, Inheritance, Polymorphism, and Abstraction are the four main principles of OOPs.
Examples of OOPs languages include Java, C++, Python, and C#.
Q5. what are the 4 pillars in oops
The 4 pillars in OOPs are Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation restricts access to certain components within a class, protecting the data.
Abstraction hides complex implementation details and only shows the necessary features.
Polymorphism allows objects to be treated as instances of their parent class or as instances of their own class.
Q6. Set methods implementation
Set methods are used to set values of private variables in a class.
Set methods are also known as setter methods.
They are used to ensure encapsulation in object-oriented programming.
They typically take a parameter and set the value of a private variable to that parameter.
For example, a set method for a class variable 'name' might look like: public void setName(String name) { this.name = name; }
Q7. HashMap internal working ?
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
HashMap uses an array of buckets to store key-value pairs
Each bucket contains a linked list of entries with the same hash code
When a key-value pair is added, its hash code is used to determine the bucket and added to the linked list
When a value is retrieved, its hash code is used to find the bucket and search the linked list for the key
HashMap uses load factor to determine when...read more
Q8. Detail explanations of oops ?
OOPs is a programming paradigm based on the concept of objects that interact with each other.
OOPs stands for Object-Oriented Programming.
It focuses on encapsulation, inheritance, and polymorphism.
Encapsulation is the process of hiding implementation details from the user.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms or behaviors.
Examples of OOPs languages include Java, C++, and Python.
Top HR Questions asked in Sun Pharmaceutical Industries
Interview Process at Sun Pharmaceutical Industries
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month