Wells Fargo
20+ Safran Engineering Services India Interview Questions and Answers
Q1. How have you implemented dependency injection in your .NET Core projects? How have you used the Razor engine to build dynamic views in your ASP.NET Core projects? Can you explain how you have used Angular to bu...
read moreAnswering questions on .NET Core, Razor engine, and Angular
Implemented dependency injection in .NET Core using built-in DI container or third-party libraries like Autofac or Ninject
Used Razor engine to build dynamic views by creating Razor views with HTML and C# code to generate dynamic content
Built single-page applications using Angular by creating components, services, and modules to manage data and UI
Q2. How have you handled security in your Angular and .NET Core applications, such as implementing JWT or OAuth authentication?
Implemented JWT and OAuth authentication in Angular and .NET Core apps.
Used Angular's HttpInterceptor to add JWT token to requests
Implemented OAuth2 authentication using IdentityServer4 in .NET Core
Stored user credentials securely using ASP.NET Core Identity
Used HTTPS to encrypt data in transit
Implemented role-based authorization using ASP.NET Core Identity
Q3. Is parallel stream always beneficial in java stream API? Java Singleton vs Spring Singleton write a program to find the nth largest number in an array of integers. Spring bean scopes. how will you handle a larg...
read moreParallel stream is not always beneficial in Java Stream API.
Parallel stream can be slower than sequential stream for small data sets or when the overhead of parallelism is greater than the benefit.
Parallel stream can be beneficial for large data sets or when the operations are independent and can be executed in parallel.
It is important to measure the performance of both sequential and parallel streams for a specific use case to determine which is more efficient.
Q4. Performance and security best practices for web application
Best practices for web app performance and security
Use caching to improve performance
Minimize HTTP requests and optimize images
Implement input validation and sanitize user input to prevent attacks
Use HTTPS and secure authentication methods
Regularly update software and apply security patches
Implement rate limiting and other security measures to prevent brute force attacks
Q5. How to do multiple db congratulations in spring boot
Use Spring Boot's @Transactional annotation to handle multiple database transactions
Use @Transactional annotation on service methods to handle transactions across multiple databases
Configure multiple DataSource beans in your Spring Boot application
Use @Qualifier annotation to specify which DataSource to use in each transaction
Q6. How can millions of requests be effectively managed?
Millions of requests can be effectively managed through load balancing, caching, and scaling.
Implementing load balancing to distribute requests evenly across multiple servers
Utilizing caching mechanisms to store frequently accessed data and reduce response times
Scaling infrastructure horizontally by adding more servers to handle increased traffic
Using content delivery networks (CDNs) to cache and deliver content closer to users for faster access
Q7. When using java streams API, will the performance get impacted?
Using Java streams API may impact performance depending on how it is implemented.
Performance impact can vary based on the size of the data being processed.
Improper use of streams can lead to unnecessary overhead and decreased performance.
Parallel streams can improve performance for large datasets by utilizing multiple threads.
Careful consideration of stream operations and data size is important for optimizing performance.
Q8. Explain logging implementation in microservice 12 factor details
Logging in microservices follows 12 factor principles.
Each microservice should log to stdout or stderr
Logs should be treated as event streams and sent to a centralized log aggregator
Logs should be structured data in a common format like JSON or syslog
Logs should include contextual information like request ID, user ID, etc.
Logs should be stored and rotated automatically
Logs should be monitored for errors and anomalies
Q9. Explain how spring boot application startup works in detail
Spring Boot application startup involves auto-configuration, component scanning, and dependency injection.
Spring Boot uses embedded Tomcat, Jetty, or Undertow server for running the application.
Auto-configuration automatically configures the application based on dependencies and properties.
Component scanning scans the project for components like controllers, services, and repositories.
Dependency injection injects dependencies into components using annotations like @Autowired.
Q10. Authentication and Authorization in .Net core
Authentication and Authorization in .Net core
Authentication verifies the identity of a user while Authorization checks if the user has access to a resource
.Net core provides built-in authentication and authorization middleware
Authentication can be done using various methods like JWT, OAuth, Cookies, etc.
Authorization can be done using policies, roles, claims, etc.
Q11. How to configure 2 data base in spring boot
To configure 2 databases in Spring Boot, you can use multiple DataSource beans and specify them in application.properties.
Define multiple DataSource beans in your configuration class
Use @Primary annotation to specify the primary DataSource
Use @Qualifier annotation to specify the secondary DataSource
Configure the properties for each DataSource in application.properties
Q12. What is ConcurrentModificationException in Java
ConcurrentModificationException is a runtime exception thrown by Java when an object is modified concurrently while iterating over it.
Occurs when a collection is modified while being iterated over using an iterator
Can be avoided by using ConcurrentHashMap or CopyOnWriteArrayList
Example: List
list = new ArrayList<>(); Iterator iterator = list.iterator(); list.add("example");
Q13. Difference between spring mvc and spring boot
Spring MVC is a web framework for building web applications, while Spring Boot is an opinionated way to create Spring applications.
Spring MVC is a part of the larger Spring Framework, providing a model-view-controller architecture for web applications.
Spring Boot is a standalone application that simplifies the Spring application development process by providing defaults for configuration.
Spring Boot includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to ...read more
Q14. Difference between Array and Linked list
Arrays store elements in contiguous memory locations, while linked lists store elements in nodes with pointers to the next node.
Arrays have fixed size, while linked lists can dynamically grow or shrink.
Accessing elements in arrays is faster (O(1)), while in linked lists it is slower (O(n)).
Inserting or deleting elements in arrays can be inefficient, as it may require shifting elements, while in linked lists it can be done in constant time by adjusting pointers.
Q15. Explain microservice pattern,
Microservice pattern is an architectural style where an application is composed of small, independent services that communicate with each other.
Each service is responsible for a specific task or functionality
Services communicate with each other through APIs
Each service can be developed, deployed, and scaled independently
Allows for greater flexibility, agility, and resilience
Examples include Netflix, Amazon, and Uber
Q16. Disadvantage of microservice
Microservices can increase complexity and require more resources to manage.
Microservices can lead to increased network latency and communication overhead.
Managing multiple services can be more complex than managing a monolithic application.
Microservices require more resources to manage, including additional servers and monitoring tools.
Testing and debugging can be more difficult in a distributed system.
Security can be more challenging in a microservices architecture.
Service d...read more
Q17. What is react hooks
React Hooks are functions that let you use state and other React features without writing a class.
React Hooks were introduced in React 16.8 to allow functional components to have state and lifecycle methods.
They allow you to reuse stateful logic across multiple components without changing the component hierarchy.
Some commonly used React Hooks are useState, useEffect, useContext, and useReducer.
Example: useState hook allows you to add state to a functional component like a cla...read more
Q18. What us virtual dom
Virtual DOM is a lightweight copy of the actual DOM used for efficient updates in web development.
Virtual DOM is a concept used in frameworks like React to improve performance by minimizing actual DOM updates.
Changes are first made to the virtual DOM, then compared with the actual DOM to only update what has changed.
This process helps reduce the number of manipulations needed on the real DOM, leading to faster rendering.
Q19. Functional vs class components
Functional components are simpler, stateless, and use hooks. Class components have lifecycle methods and state management.
Functional components are simpler and easier to read/write.
Class components have lifecycle methods like componentDidMount, componentDidUpdate, etc.
Functional components use hooks for state management and side effects.
Class components use this keyword for accessing props and state.
Example: Functional component - const MyComponent = () => { return
Hello Worl...read more
Q20. SOLID design principles
SOLID design principles are a set of five principles to help developers create more maintainable and scalable software.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open/Closed Principle: Classes should be open for extension but closed for modification.
L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the program's correctness.
I - Interface Segregation Prin...read more
Q21. Concurrent hashmap use case
Concurrent hashmap is used for thread-safe operations in a multi-threaded environment.
Concurrent hashmap allows multiple threads to read and write to the map concurrently without causing data corruption.
It is useful in scenarios where multiple threads need to access and update a shared hashmap.
Example: Implementing a cache system where multiple threads can read and write data concurrently.
Q22. React js vs Angular
React js is a lightweight library for building user interfaces, while Angular is a full-fledged framework with more features and complexity.
React is more flexible and allows for easier integration with other libraries and frameworks.
Angular provides more out-of-the-box features like routing, forms handling, and dependency injection.
React is easier to learn and has a larger community support.
Angular has a steeper learning curve but offers more structure and consistency in larg...read more
Q23. explain promises
Promises are objects representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in JavaScript.
They can be in one of three states: pending, fulfilled, or rejected.
Promises can be chained using .then() to handle success and failure.
They help avoid callback hell and make code more readable and maintainable.
Q24. Encryption on iOS
Encryption on iOS involves using various APIs and libraries to secure data at rest and in transit.
iOS provides built-in encryption APIs like CommonCrypto for data protection.
Use Secure Enclave for storing sensitive data like passwords and keys.
Implement TLS/SSL for secure communication over network.
Consider using third-party libraries like CryptoSwift for additional encryption functionalities.
Q25. Wcf service design
WCF service design involves defining contracts, endpoints, bindings, and behaviors for communication between clients and services.
Define service contracts using interfaces and data contracts for message exchange
Configure endpoints to specify where the service is hosted and how clients can access it
Choose appropriate bindings for communication protocols and message encoding
Implement behaviors for error handling, security, and performance optimization
Top HR Questions asked in Safran Engineering Services India
Interview Process at Safran Engineering Services India
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month