Morningstar
10+ Codex Software Solution Interview Questions and Answers
Q1. What is difference between @primary and @Qualifier?
Primary is used to define a primary bean when multiple beans of the same type are present, while Qualifier is used to specify which bean to autowire when multiple beans of the same type are present.
Primary annotation is used to give a higher preference to a bean when multiple beans of the same type are present in the Spring application context.
Qualifier annotation is used to specify which bean to autowire when multiple beans of the same type are present. It helps in resolving...read more
Q2. How we can handle fault tolerance in Microservices?
Fault tolerance in Microservices can be achieved through redundancy, graceful degradation, and circuit breakers.
Implementing redundancy by having multiple instances of each microservice running to handle failures.
Using graceful degradation to ensure that the system can still function even if certain microservices are unavailable.
Utilizing circuit breakers to prevent cascading failures by temporarily stopping requests to a failing microservice.
Q3. Thread vs task in multiprocessing.. explain with examples
Threads and tasks are both used in multiprocessing, but have different characteristics and use cases.
Threads are lightweight processes within a single process, sharing memory space. They are managed by the operating system.
Tasks are units of work that can be executed asynchronously. They are typically managed by a task scheduler.
Threads are suitable for parallel processing and improving performance, while tasks are useful for handling asynchronous operations and managing comp...read more
Q4. How to implement spring security?
Implementing Spring Security involves configuring security settings in the Spring application.
Add Spring Security dependency in pom.xml
Configure security settings in SecurityConfig class
Define user roles and permissions
Use annotations like @EnableWebSecurity and @Secured
Q5. Difference between executors &executorservice?
Executors are a class that provides factory and utility methods for Executor, ExecutorService is an interface that represents an asynchronous execution service.
Executors class provides factory and utility methods for Executor interface
ExecutorService is an interface that represents an asynchronous execution service
ExecutorService extends Executor interface
ExecutorService provides methods to manage termination and produce Future objects for tracking progress of one or more asy...read more
Q6. Explain OAuth 2 implementation?
OAuth 2 is an authorization framework that allows a third-party application to obtain limited access to an HTTP service.
OAuth 2 is used for delegated access, allowing a user to grant a third-party application access to their resources without sharing their credentials.
It involves the use of access tokens, which are issued by the authorization server after the user authenticates and authorizes the application.
OAuth 2 supports different grant types such as authorization code, i...read more
Q7. Memory management in Java ?
Java uses automatic memory management through garbage collection to allocate and deallocate memory.
Java uses garbage collection to automatically manage memory by deallocating objects that are no longer needed.
The JVM has a heap where objects are allocated and garbage collection is performed to reclaim memory.
Java provides the 'finalize()' method for objects to perform cleanup before they are garbage collected.
Memory leaks can occur in Java if objects are not properly derefere...read more
Q8. Different types of gc?
Different types of garbage collection algorithms in software development.
Mark and Sweep: Identifies and removes unreachable objects.
Generational: Divides objects into different generations based on age.
Parallel: Uses multiple threads to perform garbage collection concurrently.
Incremental: Spreads garbage collection work over multiple cycles to reduce pause times.
Q9. ViewBag vs Tempdata in MVC
ViewBag is used to pass data from controller to view, while TempData is used to pass data between controller actions.
ViewBag is a dynamic property that allows you to pass data from controller to view
TempData is a dictionary object that allows you to pass data between controller actions
ViewBag is not type-safe and requires typecasting, while TempData is type-safe
ViewBag data is lost if redirection occurs, while TempData data persists for the next request
Q10. Abstract vs Interface
Abstract classes can have both abstract and non-abstract methods, while interfaces can only have abstract methods.
Abstract classes can have constructors, fields, and non-abstract methods.
Interfaces can only have abstract methods and constants.
A class can implement multiple interfaces but can only inherit from one abstract class.
Q11. Optimization Techniques
Optimization techniques are methods used to improve the efficiency and performance of software applications.
Use of algorithms like dynamic programming and greedy algorithms
Profiling and performance tuning to identify bottlenecks
Code refactoring to improve readability and maintainability
Utilizing caching and memoization for faster access to data
Parallel processing and multi-threading for improved concurrency
Q12. Pagination in SQL
Pagination in SQL allows for displaying a subset of query results at a time.
Use LIMIT and OFFSET clauses in SQL queries to implement pagination.
LIMIT specifies the maximum number of rows to return.
OFFSET specifies the number of rows to skip before starting to return rows.
Q13. Arraylist find duplicate
Find duplicates in an ArrayList of strings.
Iterate through the ArrayList and use a HashSet to keep track of seen elements.
If an element is already in the HashSet, it is a duplicate.
Store the duplicates in a separate ArrayList or print them directly.
More about working at Morningstar
Interview Process at Codex Software Solution
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month