Add office photos
Employer?
Claim Account for FREE

Capita

3.6
based on 2.4k Reviews
Video summary
Filter interviews by

30+ Bajaj Finance Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Palindrome String Validation

Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.

Note:
The string 'S' should be evaluated in a case-insensi...read more
Ans.

Check if a given string is a palindrome after removing special characters, spaces, and converting to lowercase.

  • Remove special characters and spaces from the input string

  • Convert the string to lowercase

  • Check if the modified string is a palindrome by comparing characters from start and end

Add your answer

Q2. Reverse Stack with Recursion

Reverse a given stack of integers using recursion. You must accomplish this without utilizing extra space beyond the internal stack space used by recursion. Additionally, you must r...read more

Ans.

Reverse a given stack of integers using recursion without using extra space or loop constructs.

  • Use recursion to pop all elements from the original stack and store them in function call stack.

  • Once the stack is empty, push the elements back in reverse order using recursion.

  • Make use of the top(), pop(), and push() stack methods provided.

Add your answer
Q3. How many types of memory areas are allocated by the JVM?
Ans.

JVM allocates 5 types of memory areas: Method Area, Heap, Stack, PC Register, and Native Method Stack.

  • Method Area stores class structures and static variables.

  • Heap is where objects are allocated.

  • Stack holds method-specific data and references.

  • PC Register stores the address of the current instruction being executed.

  • Native Method Stack is used for native method execution.

Add your answer

Q4. How to display values fetch from a table with alternate value

Ans.

Display values from a table with alternate value

  • Use a loop to iterate through the table values

  • Use an if-else statement to check for alternate values

  • Display the alternate values using a different formatting or color

  • Consider using CSS or JavaScript to enhance the display

Add your answer
Discover Bajaj Finance interview dos and don'ts from real experiences
Q5. What are the advantages of using the Optional class in Java?
Ans.

Optional class in Java provides a way to handle null values more effectively.

  • Prevents NullPointerException by explicitly checking for null values

  • Encourages developers to handle null values properly

  • Provides methods like isPresent(), ifPresent(), orElse() for better null value handling

  • Improves code readability and maintainability

  • Example: Optional<String> optionalString = Optional.ofNullable(str);

Add your answer
Q6. What are the @RequestMapping and @RestController annotations used for in Spring Boot?
Ans.

The @RequestMapping annotation is used to map web requests to specific handler methods, while @RestController is used to define RESTful web services.

  • The @RequestMapping annotation is used to map HTTP requests to specific handler methods in a controller class.

  • It can be used to specify the URL path, HTTP method, request parameters, headers, and media types for the mapping.

  • Example: @RequestMapping(value = "/hello", method = RequestMethod.GET)

  • The @RestController annotation is use...read more

Add your answer
Are these interview questions helpful?
Q7. How can you find the number of rows and eliminate duplicate values in a DB2 table?
Ans.

To find the number of rows and eliminate duplicate values in a DB2 table, you can use SQL queries.

  • Use the COUNT function to find the number of rows in the table.

  • To eliminate duplicate values, use the DISTINCT keyword in your SELECT query.

  • You can also use the GROUP BY clause to group rows with the same values and then use aggregate functions like COUNT to find the number of unique rows.

Add your answer
Q8. What are the major differences between @RequestMapping and @GetMapping in Spring Boot?
Ans.

Major differences between @RequestMapping and @GetMapping in Spring Boot

  • 1. @RequestMapping can be used for all HTTP methods, while @GetMapping is specific to GET requests.

  • 2. @RequestMapping allows for more customization with parameters like method, headers, and produces/consumes, while @GetMapping is more concise.

  • 3. @GetMapping is a specialized version of @RequestMapping with method set to GET by default.

  • 4. Example: @RequestMapping(value = "/example", method = RequestMethod.P...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟
Q9. What is the difference between an abstract class and an interface in OOP?
Ans.

Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

  • Abstract class can have constructors, fields, and methods, while interface cannot have any implementation.

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

  • Abstract classes are used to define common characteristics among subclasses, while interfaces are used to define a contract for classes to implement.

  • Example: Abstract class 'Shape' ...read more

Add your answer
Q10. What is the use of the @Transactional annotation in Spring JPA?
Ans.

The @Transactional annotation in Spring JPA is used to manage transactions in database operations.

  • Ensures that a method is executed within a transaction context

  • Rolls back the transaction if an exception is thrown

  • Controls the transaction boundaries

Add your answer
Q11. Can you explain the difference between setMaxResults() and setFetchSize() in a Query?
Ans.

setMaxResults() limits the number of results returned by a query, while setFetchSize() sets the number of rows to fetch in each round trip to the database.

  • setMaxResults() is used to limit the number of results returned by a query.

  • setFetchSize() sets the number of rows to fetch in each round trip to the database.

  • setMaxResults() is typically used for pagination purposes.

  • setFetchSize() can improve performance by reducing the number of round trips to the database.

  • Example: setMaxR...read more

Add your answer
Q12. Can you explain briefly about the Session interface used in Hibernate?
Ans.

Session interface in Hibernate is used to create, read, update, and delete persistent objects.

  • Session interface is used to interact with the database in Hibernate.

  • It represents a single-threaded unit of work.

  • It is lightweight and designed to be instantiated each time an interaction with the database is needed.

  • Session interface provides methods like save, update, delete, get, load, etc.

  • Example: Session session = sessionFactory.openSession();

Add your answer
Q13. How can you highlight and use a CURSOR in a COBOL program?
Ans.

CURSOR in COBOL is used to navigate through a result set in a database program.

  • Declare a CURSOR in the Working-Storage section of the COBOL program

  • Open the CURSOR to fetch data from the database

  • Use FETCH statement to retrieve rows from the result set

  • Process the fetched data as needed

  • Close the CURSOR when done with the result set

Add your answer

Q14. Where did u implemented oops concepts in your project? Stream api, Map in Collections

Ans.

Yes

  • Implemented OOPs concepts in the project using Stream API

  • Utilized Map in Collections to implement OOPs principles

  • Used Stream API to apply functional programming concepts in the project

Add your answer

Q15. Write controller to serve POST request for a rest call in spring

Ans.

A controller to handle POST requests in a Spring REST API.

  • Create a new class annotated with @RestController

  • Define a method in the class annotated with @PostMapping

  • Use @RequestBody annotation to bind the request body to a parameter

  • Implement the logic to handle the POST request

  • Return the response using ResponseEntity

Add your answer

Q16. How to remove low values while fetching data from table in DB2

Ans.

Use SQL query with WHERE clause to filter out low values while fetching data from DB2 table

  • Use SELECT statement to fetch data from table

  • Add WHERE clause with condition to filter out low values

  • Example: SELECT * FROM table_name WHERE column_name > 10

  • Use ORDER BY clause to sort the data in ascending or descending order

Add your answer
Q17. What is meant by normalization and denormalization?
Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Denormalization is the opposite process.

  • Normalization involves breaking down a table into smaller tables and defining relationships between them to reduce redundancy.

  • Denormalization involves combining tables to reduce the number of joins needed for queries, sacrificing some normalization benefits for performance.

  • Normalization helps in maintaining data integrity and c...read more

Add your answer
Q18. What are some standard Java pre-defined functional interfaces?
Ans.

Standard Java pre-defined functional interfaces include Function, Consumer, Predicate, Supplier, etc.

  • Function: Represents a function that accepts one argument and produces a result. Example: Function<Integer, String>

  • Consumer: Represents an operation that accepts a single input argument and returns no result. Example: Consumer<String>

  • Predicate: Represents a predicate (boolean-valued function) of one argument. Example: Predicate<Integer>

  • Supplier: Represents a supplier of result...read more

Add your answer
Q19. Can you explain Spring Actuator and its advantages?
Ans.

Spring Actuator is a set of production-ready features to help monitor and manage your application.

  • Provides insight into application's health, metrics, and other useful information

  • Enables monitoring and managing of application in real-time

  • Helps in identifying and troubleshooting issues quickly

  • Can be easily integrated with other monitoring tools like Prometheus or Grafana

Add your answer
Q20. What are the concurrency strategies available in Hibernate?
Ans.

Hibernate provides several concurrency strategies like optimistic locking, pessimistic locking, and versioning.

  • Optimistic locking: Allows multiple transactions to read a row simultaneously, but only one can update it. Uses versioning or timestamp to check for conflicts.

  • Pessimistic locking: Locks the row for exclusive use by one transaction, preventing other transactions from accessing it until the lock is released.

  • Versioning: Uses a version number or timestamp to track change...read more

Add your answer
Q21. What are the features of a lambda expression?
Ans.

Lambda expressions are anonymous functions that can be passed as arguments to methods or stored in variables.

  • Lambda expressions are written using the -> operator.

  • They can have zero or more parameters.

  • They can have zero or more statements.

  • They can be used to implement functional interfaces in Java.

  • Example: (a, b) -> a + b

Add your answer

Q22. Annotations used in web services, pagination, exception handling in spring

Ans.

Annotations used in web services, pagination, exception handling in Spring

  • Web services in Spring can be annotated with @RestController or @Controller

  • Pagination can be achieved using @PageableDefault and @PageableParam

  • Exception handling can be done using @ExceptionHandler and @ControllerAdvice

Add your answer
Q23. When can you use the super keyword?
Ans.

The super keyword is used to refer to the parent class of a subclass.

  • Used to call methods or access fields from the parent class

  • Helps in achieving method overriding in inheritance

  • Can be used to call the constructor of the parent class

Add your answer

Q24. Usage of @Transactional annotation in spring JPA

Ans.

The @Transactional annotation is used in Spring JPA to manage transactions in database operations.

  • The @Transactional annotation is used to mark a method or class as transactional.

  • It ensures that all database operations within the annotated method or class are executed within a single transaction.

  • If an exception occurs, the transaction is rolled back, and changes made within the transaction are not persisted.

  • The @Transactional annotation can be used with different propagation ...read more

Add your answer
Q25. What is a correlated subquery in DBMS?
Ans.

A correlated subquery is a subquery that references a column from the outer query, allowing for more complex filtering and data retrieval.

  • Correlated subqueries are executed for each row processed by the outer query.

  • They can be used to filter results based on values from the outer query.

  • Example: SELECT * FROM table1 t1 WHERE t1.column1 = (SELECT MAX(column2) FROM table2 t2 WHERE t2.column3 = t1.column3);

Add your answer
Q26. How do you combine two tables in SQL?
Ans.

Use the SQL JOIN clause to combine two tables based on a related column.

  • Use the JOIN clause to specify the columns from each table that should be used for the join

  • Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN

  • Example: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column

Add your answer
Q27. What are a few features of Spring Boot?
Ans.

Spring Boot is a framework that simplifies the development of Java applications by providing production-ready features out of the box.

  • Auto-configuration: Spring Boot automatically configures the application based on dependencies added to the project.

  • Embedded server: Spring Boot includes an embedded Tomcat, Jetty, or Undertow server for running applications without needing to deploy to a separate server.

  • Actuator: Built-in monitoring and management features like health checks, ...read more

Add your answer
Q28. How does MVC work in Spring?
Ans.

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

  • Model represents the data and business logic of the application.

  • View is responsible for rendering the user interface based on the data from the Model.

  • Controller handles user input, processes requests, and updates the Model accordingly.

  • Spring MVC provides annotations like @Controller, @RequestMapping, and @ModelAttribute to implement MVC architecture.

  • Example:...read more

Add your answer
Q29. How does Spring Boot work?
Ans.

Spring Boot is a framework that simplifies the development of Java applications by providing pre-configured settings and tools.

  • Spring Boot eliminates the need for manual configuration by providing defaults for most settings.

  • It includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to run applications without deploying WAR files.

  • Spring Boot also offers a wide range of plugins to enhance development productivity, such as Spring Initializr for project setup.

Add your answer

Q30. Sort using JCL and COBOL

Ans.

Sorting using JCL and COBOL

  • JCL can be used to submit a COBOL program for sorting

  • COBOL program can use SORT verb to sort data

  • Sorting can be done based on specific fields or criteria

  • COBOL program can use SORT-RETURN to check the status of the sort operation

View 1 answer
Q31. What is Spring Batch?
Ans.

Spring Batch is a lightweight, comprehensive framework for batch processing in Java.

  • Spring Batch provides reusable functions for processing large volumes of data.

  • It supports reading, processing, and writing data in chunks.

  • It includes features like transaction management, job processing, and job scheduling.

  • Example: Using Spring Batch to process and import large CSV files into a database.

Add your answer

Q32. Cursor in DB2

Ans.

Cursor is a database object used to manipulate data in a result set.

  • Cursor is used to fetch a set of rows from a result set.

  • It allows the application to move forward and backward through the result set.

  • Cursor can be declared and opened in SQL.

  • It can be used to update or delete rows in a result set.

  • Cursor can be closed explicitly or implicitly.

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

Interview Process at Bajaj Finance

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

Top Software Consultant Interview Questions from Similar Companies

3.9
 • 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
75 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