Senior Software Engineer

filter-iconFilter interviews by

4000+ Senior Software Engineer Interview Questions and Answers

Updated 3 Mar 2025

Popular Companies

search-icon

Q101. How do you find the code performance issue in the code deployed in production?

Ans.

To find code performance issues in production, use monitoring tools and profiling techniques.

  • Use monitoring tools like New Relic, AppDynamics, or Datadog to track performance metrics and identify bottlenecks.

  • Use profiling techniques like CPU profiling, memory profiling, and network profiling to pinpoint specific areas of the code that are causing performance issues.

  • Analyze logs and error messages to identify patterns and potential performance issues.

  • Perform load testing and s...read more

Q102. Can we override or replace the embedded Tomcat server in Spring Boot?
Ans.

Yes, we can override or replace the embedded Tomcat server in Spring Boot.

  • Spring Boot allows for customization of embedded servers through configuration properties.

  • You can replace Tomcat with other embedded servers like Jetty or Undertow.

  • Example: To use Jetty instead of Tomcat, exclude Tomcat dependencies and include Jetty dependencies in your pom.xml file.

Q103. Can you write a program to show the percentage of completion while file is uploading to server?

Ans.

Yes

  • Use AJAX or WebSocket to send file data to the server

  • Track the progress of the file upload using the 'progress' event

  • Calculate the percentage of completion based on the total file size and the amount uploaded

Q104. (HLD) -> Design a service which combines multiple sources of data/documentation and aggregates it such that all info is available centrally.

Ans.

Design a service to aggregate multiple sources of data/documentation centrally.

  • Identify sources of data/documentation

  • Determine data aggregation method

  • Design a centralized database to store aggregated data

  • Develop a user-friendly interface to access the data

  • Ensure data security and privacy

Are these interview questions helpful?
Q105. What are the start() and run() methods of the Thread class?
Ans.

The start() method is used to start a new thread and execute the run() method.

  • The start() method creates a new thread and calls the run() method.

  • The run() method contains the code that will be executed in the new thread.

  • Calling the run() method directly will not create a new thread.

  • The start() method should be called to start the execution of the new thread.

Q106. What are the different sizes available for a virtual warehouse in Snowflake, and which sizes are currently being utilized in your current project?

Ans.

Snowflake offers virtual warehouses in various sizes for different computing needs.

  • Sizes available for virtual warehouses in Snowflake include X-Small, Small, Medium, Large, X-Large, 2X-Large, and 4X-Large.

  • The size utilized in the current project depends on the specific computing requirements and workload demands.

  • For example, a Small virtual warehouse may be sufficient for basic data processing tasks, while a 4X-Large warehouse may be needed for complex analytics or large-sca...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q107. Difference between asp .net Vs asp .net MVC? Explain benefits of MVC?

Ans.

ASP.NET is a web development framework while ASP.NET MVC is a design pattern for building web applications.

  • ASP.NET is a web development framework that follows a Web Forms model, where the UI and logic are tightly coupled.

  • ASP.NET MVC is a design pattern that separates the UI and logic, providing better maintainability and testability.

  • MVC allows for more control over the HTML, CSS, and JavaScript, making it easier to create responsive and interactive web applications.

  • ASP.NET MV...read more

Q108. An unsorted array has numbers. Find the duplicate numbers and return the array.

Ans.

Find duplicate numbers in an unsorted array and return the array.

  • Iterate through the array and keep track of seen numbers using a hash table.

  • If a number is already in the hash table, it is a duplicate.

  • Add the duplicate number to a new array and return it.

Senior Software Engineer Jobs

Senior Software Engineer - Frontend Software Engineer 6-11 years
Caterpillar Brazil
4.3
Chennai
Senior Software Engineer - Data Engineer (DQME Core Layer) 3-7 years
CATERPILLAR INDIA PRIVATE LTD
4.3
Chennai
Senior Software Engineer - Data Engineer (DQME Core Layer) 4-7 years
Caterpillar Brazil
4.3
Chennai

Q109. Difference between abstract and interface and how to use in your projects?

Ans.

Abstract classes are classes that cannot be instantiated and can have both abstract and non-abstract methods. Interfaces are contracts that define the methods that a class must implement.

  • Abstract classes can have constructors while interfaces cannot

  • A class can implement multiple interfaces but can only inherit from one abstract class

  • Abstract classes can have instance variables while interfaces cannot

  • Interfaces can have default methods while abstract classes cannot

  • Abstract cla...read more

Q110. Efficient Program to identify if a string is palindrome, program to identify missing number from sequential numbers, design patterns, disposable pattern, .net framework, website traffic handling, basic concepts...

read more
Ans.

Interview question for Senior Software Engineer covering various topics.

  • Palindrome program using string reversal or iteration

  • Missing number program using arithmetic formula or iteration

  • Disposable pattern for managing resources

  • ASP.NET MVC basics including routing and controllers

  • SQL Server query optimization techniques

  • Scrum methodology and its ceremonies

Q111. How can you achieve multitasking in Java?
Ans.

Multitasking in Java can be achieved using threads.

  • Create multiple threads to execute tasks concurrently.

  • Use the Thread class or the Runnable interface to define the tasks.

  • Use synchronization mechanisms like locks or semaphores to coordinate access to shared resources.

  • Java provides built-in support for multitasking with the Thread class and the Executor framework.

  • Example: creating two threads to perform different tasks simultaneously.

Q112. what is difference between controller and rest controller?

Ans.

A controller is a component that handles incoming requests and returns a response, while a REST controller specifically handles RESTful requests.

  • A controller is responsible for handling various types of requests, such as HTTP, WebSocket, etc.

  • A REST controller is a type of controller that specifically handles RESTful requests, which follow the principles of Representational State Transfer (REST).

  • REST controllers typically use annotations like @RestController and @RequestMappin...read more

Q113. Tell me in detail step by step process for registering XML Publisher Report

Ans.

The process for registering XML Publisher Report

  • Create a data model for the report

  • Create a template for the report using RTF or XSL-FO

  • Upload the template to the server

  • Create a report definition using the data model and template

  • Register the report definition with the XML Publisher server

Q114. why string in c# is immutable how can we resolve it?

Ans.

Strings in C# are immutable to ensure data integrity and thread safety.

  • Immutable strings prevent accidental data modification, ensuring data integrity.

  • To resolve immutability, use StringBuilder class for mutable string operations.

  • Example: StringBuilder sb = new StringBuilder("Hello"); sb.Append(" World");

Q115. Write program to count frequencyOfChars(String inputStr) ex. abbcddda a:2 b:2 c:1 d:3 Write program to isPowerOf3(int n) ex. 3->true 27->true 30->false Write SQL query of Emp (emp_id, name) Country Sal (emp_id,...

read more
Ans.

Programs to count frequency of characters in a string, check if a number is power of 3, and SQL query to get highest salary employees by country.

  • For frequencyOfChars, use a HashMap to store character counts and iterate through the string.

  • For isPowerOf3, keep dividing the number by 3 until it becomes 1 or not divisible by 3.

  • For SQL query, use a subquery to get max salary for each country and join with Emp table.

  • Example SQL query: SELECT e1.* FROM Emp e1 JOIN (SELECT Country, M...read more

Q116. How does index hunting help improve query performance?
Ans.

Index hunting helps improve query performance by reducing the number of rows that need to be scanned.

  • Indexes allow the database to quickly locate the rows that satisfy a query criteria.

  • By using indexes, the database can avoid scanning the entire table, leading to faster query execution.

  • Examples of indexes include primary keys, unique keys, and indexes on frequently queried columns.

Q117. in Angular what is services and how to call service api, and how bind our data with in component.

Ans.

Services in Angular are singleton objects that provide functionality to components. They can be called using dependency injection.

  • Services are used to share data and functionality across multiple components

  • They can be created using the 'ng generate service' command

  • Services can be injected into components using the constructor

  • To call a service API, use Angular's HttpClient module

  • Data can be bound to components using property binding or two-way binding

Q118. why java is preferred? whats the benefit of functional programming and why introduced in java. what are wrapper classes, fibonaaci series , whats the use of join? what is threadinterrupted exception ? how hashm...

read more
Ans.

Answers to various technical questions related to Java programming.

  • Java is preferred for its platform independence, object-oriented nature, and vast community support.

  • Functional programming in Java allows for more concise and readable code, and better support for parallel processing.

  • Wrapper classes are used to convert primitive data types into objects, and vice versa.

  • Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.

  • Join is a met...read more

Q119. Write a Program to find a second max in the give list? and Time Complexity

Ans.

Program to find second max in a list and its time complexity

  • Sort the list in descending order and return the second element

  • Traverse the list and keep track of the maximum and second maximum elements

  • Time complexity: O(n)

Q120. What is current project and what is tech stack used in it?

Ans.

I am currently working on a web application for a retail company using React, Node.js, and MongoDB.

  • Developing a responsive UI using React and Redux

  • Implementing server-side logic using Node.js and Express

  • Storing and retrieving data using MongoDB

  • Integrating third-party APIs for payment processing and shipping

  • Writing automated tests using Jest and Enzyme

Q121. Are exceptions can be written in a catch block seperated by commas,?

Ans.

Yes, multiple exceptions can be caught in a single catch block separated by commas.

  • Multiple exceptions can be caught in a single catch block separated by commas.

  • This can be useful when handling different types of exceptions in a similar way.

  • For example: catch (IOException | SQLException ex) { // handle exception }

Q122. Can you explain the life cycle of a thread in Java?
Ans.

The life cycle of a thread in Java involves creation, running, blocking, and termination.

  • A thread is created by instantiating a class that extends Thread or implements Runnable interface.

  • The thread starts running when the start() method is called, executing the run() method.

  • A thread can be blocked by calling sleep(), wait(), or join() methods.

  • A thread terminates when the run() method completes or when stop() method is called.

Q123. What are the different types of severity that can be assigned to a bug?
Ans.

Different types of severity levels for bugs include critical, major, minor, and trivial.

  • Critical - Bug causes system crash or data loss.

  • Major - Bug affects major functionality.

  • Minor - Bug affects minor functionality.

  • Trivial - Bug has cosmetic issues.

  • Examples: Critical - Login failure, Major - Payment processing error, Minor - UI alignment issue, Trivial - Spelling mistake

Q124. What command can be run to import a pre-exported Docker image into another Docker host?
Ans.

The command to import a pre-exported Docker image into another Docker host is 'docker load'

  • Use the 'docker load' command followed by the file path of the exported image tarball to import it into the Docker host

  • For example, 'docker load < my_image.tar.gz' will import the image from the file 'my_image.tar.gz'

  • Ensure that you have the necessary permissions to access the file and import images on the target Docker host

Q125. What is the difference between the interrupted() and isInterrupted() methods in Java?
Ans.

interrupted() checks if the current thread has been interrupted, while isInterrupted() checks if a thread has been interrupted.

  • interrupted() is a static method in the Thread class, while isInterrupted() is an instance method.

  • interrupted() clears the interrupted status of the current thread, while isInterrupted() does not.

  • Example: Thread.currentThread().interrupt(); System.out.println(Thread.interrupted()); // prints true

  • Example: Thread.currentThread().interrupt(); System.out....read more

Q126. How can you implement the lifecycle of a React component in a functional component?

Ans.

Implementing the lifecycle of a React component in a functional component

  • Use the useEffect hook to replicate lifecycle methods like componentDidMount, componentDidUpdate, and componentWillUnmount

  • Pass an empty array as the second argument to useEffect to mimic componentDidMount

  • Pass a variable or state as the second argument to useEffect to mimic componentDidUpdate

  • Return a cleanup function inside useEffect to mimic componentWillUnmount

Q127. How can you use CSS to arrange elements in a row and column layout?

Ans.

CSS can be used to arrange elements in a row and column layout using flexbox or grid layout properties.

  • Use display: flex; for a row layout and display: flex; flex-direction: column; for a column layout

  • Use justify-content and align-items properties to align items in the main axis and cross axis respectively

  • For grid layout, use display: grid; and grid-template-columns or grid-template-rows to define the layout

Q128. What are the differences between shallow copy and deep copy in JavaScript?

Ans.

Shallow copy only copies the references of nested objects, while deep copy creates new copies of nested objects.

  • Shallow copy creates a new object but does not create copies of nested objects, only copies their references.

  • Deep copy creates a new object and also creates new copies of all nested objects.

  • Shallow copy can be achieved using Object.assign() or spread operator, while deep copy can be achieved using JSON.parse(JSON.stringify()).

Q129. What are the various methods for creating an object in JavaScript?

Ans.

Various methods for creating an object in JavaScript include object literals, constructor functions, ES6 classes, and Object.create() method.

  • Object literals: var obj = { key: value };

  • Constructor functions: function ObjectName() { this.key = value; } var obj = new ObjectName();

  • ES6 classes: class ClassName { constructor() { this.key = value; } } var obj = new ClassName();

  • Object.create() method: var obj = Object.create(proto);

Q130. What is the architecture of Redux, and what purposes do middlewares serve within it?

Ans.

Redux is a predictable state container for JavaScript apps. Middlewares are functions that intercept actions before they reach the reducer.

  • Redux follows a unidirectional data flow architecture.

  • Middlewares in Redux are functions that can intercept, modify, or dispatch actions.

  • Common use cases for middlewares include logging, asynchronous API calls, and handling side effects.

  • Examples of popular Redux middlewares are Redux Thunk for async actions and Redux Logger for logging act...read more

Q131. What is the difference between class-based components and functional components in React?

Ans.

Class-based components use ES6 classes and have lifecycle methods, while functional components are simpler and use functions.

  • Class-based components use ES6 classes to create components, while functional components are created using functions.

  • Class-based components have lifecycle methods like componentDidMount and componentDidUpdate, while functional components do not.

  • Functional components are simpler and more lightweight compared to class-based components.

  • With the introductio...read more

Q132. What are the addon that can be added with spring boot ? What is the spring boot ? What are the ways of configuring a bean in spring? And core java realted stuff.

Ans.

Answering questions related to Spring Boot and core Java

  • Spring Boot addons include Spring Security, Spring Data, and Spring Cloud

  • Spring Boot is a framework for building standalone, production-grade Spring-based applications

  • Ways of configuring a bean in Spring include XML configuration, Java-based configuration, and annotation-based configuration

  • Core Java topics include OOP concepts, collections, multithreading, and exception handling

Q133. What is Hibernate and why we are going for hibernate technology?

Ans.

Hibernate is an ORM tool used to map Java objects to database tables.

  • Hibernate simplifies database access by abstracting the JDBC API

  • It provides a framework for mapping an object-oriented domain model to a relational database

  • Hibernate supports lazy loading, caching, and transaction management

  • It reduces the amount of boilerplate code needed for database operations

  • Hibernate is widely used in enterprise Java applications

Q134. In SQL, we have a table casting, which maps actor_id with movie_id. Find the pair of actors, who acted together for the most time. if you have multiple combos, you can return any of them.

Ans.

Find the pair of actors who acted together for the most time in a SQL table.

  • Join the casting table with itself on movie_id to get pairs of actors who acted together.

  • Calculate the total time they acted together by summing the durations of their movies.

  • Order the results by total time and return the pair with the highest duration.

Q135. How will you troubleshoot 500 internal server error

Ans.

Check server logs, review code, test endpoints, and verify database connections.

  • Check server logs for error messages

  • Review code for syntax errors or logical mistakes

  • Test endpoints using tools like Postman or cURL

  • Verify database connections and credentials

  • Check for any recent changes or updates

  • Consider scaling issues or server overload

  • Consult with team members or experts if necessary

Q136. There are 1 lakh records on an employee table. How do we can optimize the below query? SELECT * FROM dbo.Employees WHERE City="Chennai"

Ans.

Optimizing query to fetch records from employee table based on city

  • Create an index on the City column

  • Use a WHERE clause with an index hint

  • Use a stored procedure to cache the query results

  • Use a materialized view to precompute the query results

Q137. What would be your suggestion for implementation in azure data factory v2?

Ans.

My suggestion for implementation in Azure Data Factory v2 is to use the Mapping Data Flow feature.

  • Utilize Mapping Data Flow for complex data transformations

  • Take advantage of the visual interface to design and debug data flows

  • Leverage the built-in data integration capabilities with other Azure services

  • Use data flow parameters and expressions for dynamic transformations

  • Monitor and optimize data flow performance using data flow debug and profiling

Q138. Suppose you have a CSV file and you want to convert this to an Apache file and load this to S3 bucket. How you will do it?

Ans.

To convert a CSV file to an Apache file and load it to an S3 bucket, use Apache NiFi for data transformation and AWS SDK for S3 upload.

  • Use Apache NiFi to read the CSV file, transform it into Apache format, and write it to a local directory.

  • Configure an Apache NiFi processor to upload the transformed file to an S3 bucket using AWS SDK.

  • Set up appropriate permissions and credentials for the S3 bucket access.

  • Monitor the Apache NiFi flow for successful file conversion and upload t...read more

Q139. What is spring and spring boot ? difference between them. What is single important spring boot dependency that make any spring project a spring boot app?

Ans.

Spring is a Java framework for building web applications. Spring Boot is a tool that simplifies the process of creating Spring-based applications.

  • Spring is a popular Java framework that provides a wide range of features for building web applications.

  • Spring Boot is a tool that makes it easier to create Spring-based applications by providing a set of pre-configured defaults.

  • The main difference between Spring and Spring Boot is that Spring requires a lot of configuration, while ...read more

Q140. What is your company's code review process? What practices you follow while writing code. How do you test your code manually?

Ans.

Our code review process involves peer reviews and automated testing. We follow best practices and use manual testing for edge cases.

  • Peer reviews are conducted for all code changes before merging into the main branch

  • We use automated testing tools like Jest and Enzyme for unit and integration testing

  • We follow best practices like writing clean and modular code, using meaningful variable names, and commenting where necessary

  • Manual testing is used for edge cases and scenarios that...read more

Q141. What is Dependency Injection and Is is implemented in project and How?

Ans.

Dependency Injection is a design pattern used to remove hard-coded dependencies and make code more flexible and testable.

  • Dependency Injection is implemented by injecting the required dependencies into a class rather than creating them within the class.

  • This can be achieved through constructor injection, setter injection, or interface injection.

  • For example, in Java, Spring Framework provides a powerful dependency injection mechanism through its @Autowired annotation.

  • Dependency ...read more

Q142. 1. Diff betn case and decode 2. Primary unique keys 3. Diff betn proc and function 4. Query for 2nd highest sal dept wise 5. Query to find sum witbout using aggregate 6. Queries on count distinct 7. Updating 2...

read more
Ans.

Answers to interview questions for Senior Software Engineer

  • 1. CASE is used to provide conditional logic in SQL queries, while DECODE is used to perform conditional value substitution.

  • 2. Primary keys are used to uniquely identify each record in a database table.

  • 3. Procedures and functions are both database objects that encapsulate a series of SQL statements, but functions return a value while procedures do not.

  • 4. SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(sal...read more

Q143. Can you explain the concept of static variables and classes in Object-Oriented Programming?
Ans.

Static variables and classes in OOP are used to store data that is shared among all instances of a class.

  • Static variables are shared among all instances of a class and retain their value throughout the program's execution.

  • Static classes cannot be instantiated and are used to group related static members together.

  • Example: In a class representing a bank account, a static variable could be used to store the total number of accounts created.

  • Example: A static class in a math libra...read more

Q144. How do you delete duplicates from a table in SQL Server?
Ans.

Use a common method like using CTE with ROW_NUMBER() function to delete duplicates from a table in SQL Server.

  • Use a common table expression (CTE) with ROW_NUMBER() function to assign a unique row number to each duplicate record.

  • Delete the duplicate records by filtering out rows with row number greater than 1.

  • Example: WITH CTE AS (SELECT *, ROW_NUMBER() OVER (PARTITION BY column1, column2 ORDER BY column3) AS rn FROM table_name) DELETE FROM CTE WHERE rn > 1;

Q145. What is GCD? Explain in details

Ans.

GCD stands for Greatest Common Divisor. It is the largest positive integer that divides two or more numbers without leaving a remainder.

  • GCD is used to find the highest common factor between two or more numbers.

  • It is often used in mathematical calculations and algorithms.

  • GCD can be calculated using various methods like Euclidean algorithm or prime factorization.

  • Example: GCD of 12 and 18 is 6, as 6 is the largest number that divides both 12 and 18 without leaving a remainder.

Q146. What is the difference between a clustered and a non-clustered index in SQL?
Ans.

Clustered index physically reorders the data in the table while non-clustered index does not.

  • Clustered index determines the physical order of data in the table, while non-clustered index does not.

  • A table can have only one clustered index, but multiple non-clustered indexes.

  • Clustered index is faster for retrieval but slower for insert and update operations, while non-clustered index is the opposite.

  • Example: Primary key in a table is usually implemented as a clustered index, wh...read more

Q147. Create table view for different profile and can have more then 60 column. How to implement dynamically

Ans.

Use dynamic SQL to create table view with more than 60 columns for different profiles

  • Use dynamic SQL to generate the CREATE VIEW statement based on the profile requirements

  • Iterate through the profile columns and add them to the CREATE VIEW statement dynamically

  • Consider using a loop or a mapping function to handle the large number of columns efficiently

Q148. System Design Round : Design IRCTC , how does IRCTC reserve a seat? What kind of locking do they use?

Ans.

IRCTC reserves seats using a complex system of availability checks and booking processes.

  • IRCTC uses a combination of real-time availability checks and booking processes to reserve seats.

  • The system checks for availability of seats in real-time and reserves them for a short period of time while the booking process is completed.

  • IRCTC uses a locking mechanism to ensure that the same seat is not booked by multiple users at the same time.

  • The locking mechanism is based on a first-co...read more

Q149. Is Authentication implemented in project and if yes How?

Ans.

Yes, authentication is implemented using OAuth 2.0 protocol.

  • OAuth 2.0 protocol is used for authentication.

  • Access tokens are issued to authorized clients.

  • Refresh tokens are used to obtain new access tokens.

  • Authentication is required for all API endpoints.

Q150. 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() determines the number of rows fetched at a time from the database.

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

  • setFetchSize() determines the number of rows fetched at a time from the database.

  • setMaxResults() is typically used for pagination purposes, while setFetchSize() can improve performance by reducing the number of round trips to the database.

  • Example: setM...read more

Previous
1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 8.2k Interviews
3.6
 • 7.6k Interviews
3.7
 • 5.6k Interviews
3.7
 • 4.8k Interviews
3.5
 • 3.8k Interviews
3.5
 • 3.8k Interviews
3.8
 • 2.9k Interviews
3.4
 • 791 Interviews
3.7
 • 536 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Recently Viewed
JOBS
Bounteous x Accolite
76 jobs
REVIEWS
Cognizant
Associate Software Engineer
3.8
(167 reviews)
JOBS
Oracle
No Jobs
REVIEWS
Capgemini
No Reviews
REVIEWS
LTIMindtree
No Reviews
COMPANY BENEFITS
Cognizant
No Benefits
SALARIES
Coforge
REVIEWS
Tech Mahindra
No Reviews
REVIEWS
Cognizant
No Reviews
COMPANY BENEFITS
Tech Mahindra
No Benefits
Senior Software Engineer Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

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