Premium Employer

Persistent Systems

3.5
based on 3.9k Reviews
Filter interviews by

20+ Lions Hospital Interview Questions and Answers

Updated 19 Dec 2024
Popular Designations

Q1. What is oop, Will sorting the list for finding two lowest elements in list be an optimal solution, what are ACID properties

Ans.

OOP stands for Object-Oriented Programming. Sorting the list for finding two lowest elements may not be optimal. ACID properties are atomicity, consistency, isolation, and durability.

  • OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.

  • Sorting the list to find two lowest elements may not be optimal as it has a time complexity of O(n log n). A more efficient solution would be to iterate t...read more

Add your answer

Q2. What is dependency Injection, how can we implement multiple interference?

Ans.

Dependency Injection is a design pattern where components are given their dependencies rather than creating them internally.

  • Dependency Injection helps in making components more modular, testable, and reusable.

  • It can be implemented using constructor injection, setter injection, or interface injection.

  • Multiple inheritance can be implemented in languages like C++ using virtual inheritance to avoid the diamond problem.

Add your answer

Q3. What is Oopps? Concept of polmorphism.

Ans.

OOPs stands for Object-Oriented Programming. Polymorphism is the ability of an object to take on many forms.

  • OOPs is a programming paradigm that focuses on objects and their interactions.

  • Polymorphism allows objects of different classes to be treated as if they are of the same class.

  • There are two types of polymorphism: compile-time and runtime.

  • Compile-time polymorphism is achieved through method overloading.

  • Runtime polymorphism is achieved through method overriding.

  • Example of p...read more

Add your answer

Q4. How our microservices are communicate with each other

Ans.

Microservices communicate with each other through APIs and message queues.

  • Microservices use APIs to send and receive data between each other.

  • They can also utilize message queues for asynchronous communication.

  • APIs can be RESTful or use other protocols like gRPC.

  • Message queues like RabbitMQ or Kafka enable decoupled communication.

  • Microservices can also use events or pub/sub patterns for communication.

View 1 answer
Discover Lions Hospital interview dos and don'ts from real experiences

Q5. What is abstract class Difference between final,finally finalize Different types of polymorphism

Ans.

Abstract class is a class that cannot be instantiated and may contain abstract methods.

  • Abstract class cannot be instantiated directly.

  • It may contain abstract methods that must be implemented by the subclass.

  • Example: abstract class Shape { abstract void draw(); }

Add your answer

Q6. what is inheritance and its type?

Ans.

Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.

  • Inheritance allows for code reuse and promotes modularity.

  • There are different types of inheritance: single, multiple, multilevel, and hierarchical.

  • Example: A 'Car' class can inherit properties and behaviors from a 'Vehicle' class.

Add your answer
Are these interview questions helpful?

Q7. AOT vs JIT compiler, Agile methodology

Ans.

AOT and JIT compilers are used to compile code, while Agile methodology is a project management approach.

  • AOT (Ahead of Time) compiler compiles code before it is executed, while JIT (Just in Time) compiler compiles code during runtime.

  • AOT is used in languages like C++, while JIT is used in languages like Java.

  • Agile methodology is a project management approach that emphasizes on iterative development, continuous feedback, and collaboration.

  • Agile methodology is used in software ...read more

Add your answer

Q8. What is OOPs, What are OOPs pillers?

Ans.

OOPs stands for Object-Oriented Programming. The pillars of OOPs are Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • OOPs is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.

  • The four pillars of OOPs are Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation refers to the bundling of d...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Write a program to demonstrate virtual function

Ans.

A program demonstrating virtual function in C++

  • Create a base class with a virtual function

  • Create derived classes that override the virtual function

  • Instantiate objects of derived classes and call the virtual function

Add your answer

Q10. One question to convert 1nf to 2nf

Ans.

To convert 1NF to 2NF, identify partial dependencies and move them to separate tables.

  • Identify the primary key in the 1NF table

  • Identify any non-key attributes that are dependent on only part of the primary key

  • Move these attributes to a new table with a composite key including the partial key and the original primary key

Add your answer

Q11. diff between c#, Asp.net and mvc

Ans.

C# is a programming language, ASP.NET is a web framework, and MVC is a design pattern for building web applications.

  • C# is used to write code for various applications, including web applications.

  • ASP.NET is a web framework that provides tools and libraries for building web applications.

  • MVC is a design pattern that separates an application into three components: Model, View, and Controller.

  • ASP.NET MVC is a web framework that uses the MVC pattern to build web applications using C...read more

Add your answer

Q12. Reverse a number in a given string

Ans.

Reverse a number in a given string

  • Iterate through the string and identify numbers

  • Reverse the identified numbers

  • Join the reversed numbers back to the original string

Add your answer

Q13. What is encapsulation

Ans.

Encapsulation is the concept of bundling data and methods that operate on the data into a single unit.

  • Encapsulation helps in hiding the internal state of an object and restricting access to it.

  • It allows for better control over the data by preventing direct access from outside the class.

  • Encapsulation also helps in achieving data abstraction, where the internal details are hidden and only the necessary information is exposed.

  • Example: In a class representing a bank account, the ...read more

Add your answer

Q14. What is oops concepts?

Ans.

Object-oriented programming concepts that focus on objects and classes to organize code and improve reusability and maintainability.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Ability of a class to inherit properties and behavior from another class.

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding the complex implementation details and showing only the necessary featur...read more

Add your answer

Q15. What is garbage collection ?

Ans.

Garbage collection is a process in programming where the system automatically reclaims memory occupied by objects that are no longer in use.

  • Garbage collection helps in managing memory efficiently by automatically deallocating memory that is no longer needed.

  • It reduces the risk of memory leaks and helps in preventing bugs related to manual memory management.

  • Examples of programming languages with garbage collection include Java, C#, and Python.

Add your answer

Q16. Summation of numbers in an IntStream

Ans.

Summation of numbers in an IntStream

  • Use the 'sum()' method on the IntStream to calculate the sum of numbers

  • Ensure the IntStream is properly initialized with numbers before calling 'sum()'

  • Example: IntStream numbers = IntStream.of(1, 2, 3, 4, 5); int sum = numbers.sum();

Add your answer

Q17. Why persistent systems pvt ltd

Ans.

Persistent Systems Pvt Ltd is known for its innovative solutions, strong work culture, and opportunities for growth.

  • Strong reputation for delivering innovative solutions

  • Positive work culture that fosters growth and learning

  • Opportunities for career advancement and skill development

  • Global presence with diverse projects and clients

Add your answer

Q18. What is a comparator?

Ans.

A comparator is a function that compares two objects to determine their ordering.

  • Used in sorting algorithms to determine the order of elements

  • Returns a negative value if the first object is less than the second, zero if they are equal, and a positive value if the first object is greater

  • Commonly used in Java with the Comparator interface

Add your answer

Q19. what is reentrant lock?

Ans.

A reentrant lock is a synchronization primitive that allows a thread to re-enter a critical section it already holds.

  • Prevents deadlock by allowing a thread to acquire the lock multiple times

  • Each lock acquisition must be followed by a corresponding release

  • Commonly used in multi-threaded programming to protect shared resources

Add your answer

Q20. string vs stringbuffer vs stringbuilder

Ans.

String, StringBuffer, and StringBuilder are classes in Java used for manipulating strings.

  • String is immutable, meaning its value cannot be changed once created.

  • StringBuffer is mutable and thread-safe, making it suitable for multi-threaded environments.

  • StringBuilder is also mutable but not thread-safe, providing better performance in single-threaded scenarios.

Add your answer

Q21. what is sql injection

Ans.

SQL injection is a type of cyber attack where malicious SQL code is inserted into input fields to manipulate a database.

  • SQL injection occurs when a user input is not properly sanitized and allows an attacker to execute malicious SQL commands.

  • It can lead to unauthorized access to sensitive data, data loss, and even complete server takeover.

  • Example: Entering ' OR '1'='1' into a login form to bypass authentication and gain access to the system.

Add your answer

Q22. Hashmap working internal details

Ans.

Hashmap is a data structure that stores key-value pairs and uses hashing to map keys to values.

  • Hashmap uses hashing function to determine the index of the key in the underlying array.

  • Collision handling is done by chaining or open addressing.

  • Hashmap provides constant time complexity O(1) for insertion, deletion, and retrieval.

  • Example: HashMap map = new HashMap<>(); map.put("key", 123); int value = map.get("key");

Add your answer

Q23. What is 1 nf 2nf

Ans.

1NF and 2NF are normalization forms in database design to reduce redundancy and improve data integrity.

  • 1NF (First Normal Form) ensures that each column in a table contains atomic values and there are no repeating groups.

  • 2NF (Second Normal Form) builds on 1NF by ensuring that all non-key attributes are fully functional dependent on the primary key.

  • For example, if we have a table 'Orders' with columns 'OrderID', 'ProductID', 'ProductName', and 'ProductPrice', we can normalize i...read more

Add your answer

Q24. what is polymorphism

Ans.

Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.

  • Polymorphism is a fundamental concept in object-oriented programming.

  • It enables code reusability and flexibility.

  • Polymorphism can be achieved through method overriding and method overloading.

  • Example: A parent class Animal can have multiple child classes like Dog, Cat, and Bird. They can all be treated as Animals.

  • Polymorphism allows for the use ...read more

Add your answer

Q25. multithreading working in java

Ans.

Multithreading is a concept in Java that allows concurrent execution of multiple threads.

  • Multithreading improves performance by utilizing multiple threads to execute tasks concurrently.

  • Java provides built-in support for multithreading through the Thread class and Runnable interface.

  • Threads can be created by extending the Thread class or implementing the Runnable interface.

  • Synchronization mechanisms like locks and semaphores can be used to control access to shared resources.

  • Th...read more

Add your answer

Q26. Merge sort algorithm working

Ans.

Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts them recursively, and then merges the sorted halves.

  • Divide the input array into two halves

  • Recursively sort the two halves

  • Merge the sorted halves back together

Add your answer

Q27. Define SOLID Principles

Ans.

SOLID principles are a set of five design principles that help make software designs more understandable, flexible, and maintainable.

  • Single Responsibility Principle (SRP) - A class should have only one reason to change.

  • Open/Closed Principle (OCP) - Software entities should be open for extension but closed for modification.

  • Liskov Substitution Principle (LSP) - Objects of a superclass should be replaceable with objects of its subclasses without affecting the functionality.

  • Inter...read more

Add your answer

Q28. design a website

Ans.

A modern and user-friendly e-commerce website for selling clothing and accessories.

  • Create a visually appealing homepage with featured products

  • Include easy navigation and search functionality

  • Implement secure payment gateways for online transactions

  • Allow users to create accounts and track their orders

  • Optimize for mobile responsiveness and fast loading times

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

Interview Process at Lions Hospital

based on 32 interviews
3 Interview rounds
Technical Round - 1
Technical Round - 2
Technical Round - 3
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.5
 • 35 Interview Questions
3.7
 • 21 Interview Questions
4.0
 • 15 Interview Questions
3.6
 • 12 Interview Questions
4.1
 • 12 Interview Questions
3.8
 • 10 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

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