Premium Employer

Volkswagen Group Technology Solution

3.9
based on 386 Reviews
Filter interviews by

Sun Pharmaceutical Industries Interview Questions and Answers

Updated 17 Jun 2024
Popular Designations

Q1. What is garbage collector and his class

Ans.

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

Add your answer

Q2. Q3. Coding to Reverse the string by words .

Ans.

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

Add your answer

Q3. Whats is dbms and what are joins?

Ans.

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.

Add your answer

Q4. Whats are oops and tell some exmaples

Ans.

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#.

Add your answer
Discover Sun Pharmaceutical Industries interview dos and don'ts from real experiences

Q5. what are the 4 pillars in oops

Ans.

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.

Add your answer

Q6. Set methods implementation

Ans.

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; }

Add your answer

Q7. HashMap internal working ?

Ans.

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

Add your answer

Q8. Detail explanations of oops ?

Ans.

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.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Sun Pharmaceutical Industries

based on 4 interviews in the last 1 year
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.3
 • 89 Interview Questions
3.9
 • 60 Interview Questions
3.8
 • 16 Interview Questions
4.2
 • 11 Interview Questions
4.2
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter