Premium Employer

Infosys

3.6
based on 39.3k Reviews
Filter interviews by

20+ Fold Health Interview Questions and Answers

Updated 8 Nov 2024
Popular Designations

Q1. A query in backend yields to 500 results but in UI you have to sort it to 10 results per page, how will you help UI achieve this?

Ans.

Implement pagination in UI by limiting results to 10 per page.

  • Implement pagination logic in UI to display 10 results per page.

  • Use backend query parameters like 'offset' and 'limit' to fetch specific results.

  • Utilize front-end frameworks like React or Angular for efficient pagination implementation.

Add your answer

Q2. If I have OS and JDK only How will you setup a Spring-Boot project in my laptop?

Ans.

To set up a Spring-Boot project with only OS and JDK, you need to install Maven and then create a new project using Spring Initializr.

  • Install Apache Maven to manage dependencies and build the project

  • Use Spring Initializr to generate a new Spring Boot project with required dependencies

  • Import the project into your IDE and start coding

Add your answer

Q3. Using single API endpoint can you perform all 3 operations, 1- Get the data, 2- Supply the data, 3- delete the data?

Ans.

Yes, by implementing a RESTful API with different HTTP methods for each operation.

  • Implement a RESTful API with different endpoints for each operation: GET for retrieving data, POST for supplying data, and DELETE for deleting data.

  • For example, GET /data to retrieve data, POST /data to supply data, and DELETE /data/{id} to delete data by ID.

  • Use proper HTTP methods and status codes to handle each operation effectively.

Add your answer

Q4. what about concurrent HashMap? spring framework IOC And DI

Ans.

ConcurrentHashMap is a thread-safe implementation of the Map interface in Java.

  • ConcurrentHashMap allows multiple threads to read and write to the map concurrently without the need for external synchronization.

  • It is part of the java.util.concurrent package and provides better performance in multi-threaded environments compared to synchronized HashMap.

  • Spring framework supports the use of ConcurrentHashMap for managing beans in a concurrent environment.

  • Inversion of Control (IoC)...read more

Add your answer
Discover Fold Health interview dos and don'ts from real experiences

Q5. What are the Spring boot annotations you use commonly?

Ans.

Commonly used Spring Boot annotations include @RestController, @Autowired, @RequestMapping, @Service, @Component, @Repository.

  • @RestController - Used to define RESTful web services.

  • @Autowired - Used for automatic dependency injection.

  • @RequestMapping - Used to map web requests to specific handler methods.

  • @Service - Used to indicate that a class is a service component.

  • @Component - Used to indicate that a class is a Spring component.

  • @Repository - Used to indicate that a class is ...read more

Add your answer

Q6. What is the latest REST API you have developed?

Ans.

I recently developed a REST API for a banking application to handle customer transactions.

  • Implemented CRUD operations for customer accounts and transactions

  • Used Spring Boot framework for building the API

  • Secured API endpoints using OAuth 2.0 authentication

  • Utilized Swagger for API documentation

Add your answer
Are these interview questions helpful?

Q7. What is role of pom.xml in a maven project?

Ans.

pom.xml is a configuration file in a Maven project that defines project dependencies, build settings, and plugins.

  • Defines project dependencies and their versions

  • Specifies build settings such as source directory, target directory, and compiler version

  • Configures plugins for various tasks like compiling code, running tests, packaging the project

  • Helps in managing project lifecycle phases like clean, compile, test, package, install, deploy

Add your answer

Q8. what is difference between method reference and functional interface?

Ans.

Method reference is a shorthand syntax for lambda expressions, while functional interface is an interface with a single abstract method.

  • Method reference is used to refer to methods or constructors without invoking them, providing a more concise way to write lambda expressions.

  • Functional interface is an interface that has only one abstract method, which can be implemented using lambda expressions or method references.

  • Example: Consumer consumer = System.out::println; is a metho...read more

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

Q9. What are the main dependencies added while creating application

Ans.

Main dependencies added while creating an application include libraries, frameworks, and external services.

  • Libraries: such as Apache Commons, Guava, or Jackson for additional functionality

  • Frameworks: like Spring, Hibernate, or Angular for structuring the application

  • External services: such as databases like MySQL or MongoDB, or APIs for integration

Add your answer

Q10. Explain the practical difference between GET & POST method calls?

Ans.

GET is used to request data from a specified resource, while POST is used to submit data to a specified resource.

  • GET requests are idempotent, meaning they can be repeated without changing the result, while POST requests are not.

  • GET requests can be cached, bookmarked, and shared, while POST requests cannot.

  • GET requests have a limit on the amount of data that can be sent, while POST requests do not have such limitations.

  • GET requests should only be used for retrieving data, whil...read more

Add your answer

Q11. How do you achieve Pagination in APIs?

Ans.

Pagination in APIs is achieved by using query parameters like page number and page size.

  • Use query parameters like 'page' and 'size' to specify the page number and number of items per page.

  • Implement logic in the backend to fetch and return only the specified page of data.

  • Calculate the total number of pages based on the total number of items and page size.

  • Include links to navigate to the next and previous pages in the API response.

Add your answer

Q12. What are actuators in Spring boot?

Ans.

Actuators in Spring Boot are built-in tools that help monitor and manage the application.

  • Actuators provide endpoints to monitor application health, metrics, info, etc.

  • They can be used to interact with the application at runtime.

  • Examples include /actuator/health, /actuator/metrics, /actuator/info, etc.

Add your answer

Q13. Memory leaks and how to avoid the same.

Ans.

Memory leaks occur when a program allocates memory but does not release it, leading to inefficient memory usage.

  • Use tools like profilers to identify memory leaks in Java applications.

  • Avoid creating unnecessary objects and ensure proper garbage collection.

  • Avoid static references to objects that can prevent them from being garbage collected.

  • Close resources like files, database connections, and streams after use to prevent memory leaks.

Add your answer

Q14. difference between throw and throws, difference between string and stringbuilder

Ans.

throw vs throws: throw is used to explicitly throw an exception, throws is used in method signature to declare exceptions that can be thrown. String vs StringBuilder: String is immutable, StringBuilder is mutable.

  • throw is used to explicitly throw an exception, while throws is used in method signature to declare exceptions that can be thrown

  • String is immutable, meaning once created, its value cannot be changed. StringBuilder is mutable, allowing for modifications to the string...read more

Add your answer

Q15. difference between abstract and interfaces, sql queries

Ans.

Abstract classes can have both abstract and non-abstract methods, while interfaces can only have abstract methods. SQL queries are used to retrieve data from databases.

  • Abstract classes can have abstract and non-abstract methods, while interfaces can only have abstract methods

  • Abstract classes can have constructors, while interfaces cannot

  • A class can implement multiple interfaces, but can only extend one abstract class

  • SQL queries are used to retrieve data from databases based o...read more

Add your answer

Q16. differnce between final, finally and finalize..

Ans.

final, finally and finalize are all related to Java programming language.

  • final is a keyword used to declare a constant variable or to prevent method overriding.

  • finally is a block used in try-catch to execute code after try and catch blocks.

  • finalize is a method used to perform cleanup operations on an object before it is garbage collected.

  • final and finally are keywords, while finalize is a method.

  • final and finally are used in code, while finalize is called by the garbage colle...read more

Add your answer

Q17. What the flow of spring boot application

Ans.

The flow of a Spring Boot application involves initialization, configuration, component scanning, and request handling.

  • Spring Boot application starts by initializing the application context.

  • Component scanning is done to find and register beans within the application context.

  • Configuration classes are used to define beans and their dependencies.

  • Request handling is done through controllers that map incoming requests to appropriate methods.

  • Spring Boot auto-configures many feature...read more

Add your answer

Q18. Do you have cloud exposure?

Ans.

Yes, I have experience working with cloud technologies such as AWS, Azure, and Google Cloud Platform.

  • Experience with AWS, Azure, and Google Cloud Platform

  • Deploying applications on cloud infrastructure

  • Working with cloud services like EC2, S3, and RDS

Add your answer

Q19. can static method be overloaded?

Ans.

Yes, static methods can be overloaded in Java.

  • Static methods can be overloaded in Java by having multiple static methods in the same class with the same name but different parameters.

  • The method signature (name + parameters) must be different for each overloaded static method.

  • Example: public static void method(int x) and public static void method(String s) are overloaded static methods.

Add your answer

Q20. Versions used in tomcat and springboot

Ans.

Tomcat and Spring Boot versions are independent of each other, but they can be compatible with each other.

  • Tomcat versions can range from 7.x to 10.x, with the latest stable version being 10.0.12.

  • Spring Boot versions are typically aligned with Spring Framework versions, with the latest stable version being 2.5.4.

  • It is important to ensure compatibility between the Tomcat and Spring Boot versions being used in a project.

Add your answer

Q21. what is oops concept

Ans.

OOPs is a programming paradigm based on the concept of objects, which can contain data and code.

  • OOPs stands for Object-Oriented Programming.

  • It focuses on creating objects that interact with each other to solve a problem.

  • It includes concepts like inheritance, polymorphism, encapsulation, and abstraction.

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

  • Polymorphism allows objects to take on multiple forms.

  • Encapsulation hides the implementation det...read more

Add your answer

Q22. Comparable vs comparator

Ans.

Comparable is an interface used for natural ordering, while Comparator is an interface used for custom ordering.

  • Comparable is implemented by the class itself to define the natural ordering of objects.

  • Comparator is implemented by a separate class to define custom ordering of objects.

  • Example: String class implements Comparable interface for natural ordering, while Collections class uses Comparator for custom sorting.

Add your answer

Q23. annotations in spring

Ans.

Annotations in Spring are used to provide metadata about the application's components, such as controllers, services, and repositories.

  • Annotations are used to simplify configuration and reduce the amount of XML configuration in Spring applications.

  • Examples of annotations in Spring include @Controller, @Service, @Repository, and @Autowired.

  • Annotations can be used to define transactional behavior, request mappings, and dependency injection in Spring applications.

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

Interview Process at Fold Health

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

Top Senior Java Developer Interview Questions from Similar Companies

3.7
 • 24 Interview Questions
3.8
 • 19 Interview Questions
3.7
 • 16 Interview Questions
3.7
 • 15 Interview Questions
3.7
 • 13 Interview Questions
3.7
 • 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