Filter interviews by
I was interviewed in Mar 2024.
posted on 6 Apr 2023
I applied via Naukri.com and was interviewed in Mar 2023. There were 3 interview rounds.
Microservices offer advantages such as scalability, flexibility, and easier maintenance.
Scalability: Microservices allow for individual components to be scaled independently, making it easier to handle high traffic.
Flexibility: Microservices can be developed and deployed independently, allowing for faster development and deployment cycles.
Easier maintenance: Microservices are smaller and more focused, making it easier ...
Disadvantages of what? Please specify.
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
HashMap uses hashing to store and retrieve values quickly
It uses an array of buckets to store key-value pairs
The hash code of the key is used to determine the bucket where the key-value pair is stored
If two keys have the same hash code, they are stored in the same bucket as a linked list
When retrieving a value, the hash ...
Linked list is dynamic and efficient for insertion/deletion, while ArrayList is faster for random access.
Linked list uses pointers to connect nodes, while ArrayList uses an underlying array.
Linked list is better for frequent insertion/deletion, while ArrayList is better for frequent random access.
Linked list has O(1) time complexity for insertion/deletion, while ArrayList has O(n) time complexity.
Example: Linked list i...
Program to get the middle of a linked list in a single iteration using two pointers.
Use two pointers, slow and fast, to traverse the linked list
Move slow pointer one step at a time and fast pointer two steps at a time
When fast pointer reaches the end, slow pointer will be at the middle node
Stack peek returns the top element without removing it, while stack pop removes and returns the top element.
Stack peek is used to check the top element of the stack without removing it.
Stack pop is used to remove and return the top element of the stack.
Both methods operate on the top element of the stack.
RequestMapping is used for all HTTP methods while PostMapping is specifically for POST requests.
RequestMapping is a general-purpose annotation for mapping HTTP requests to handler methods.
PostMapping is a specialized version of RequestMapping that only maps POST requests.
RequestMapping can be used for GET, POST, PUT, DELETE, and other HTTP methods.
PostMapping is useful when you want to handle only POST requests and ign...
Singleton is a design pattern that restricts the instantiation of a class to one object.
Singleton pattern is used when we need to ensure that only one instance of a class is created and used throughout the application.
To implement Singleton, we make the constructor private and provide a static method to get the instance of the class.
Singleton can be broken by using reflection, serialization, and cloning.
Reflection can ...
A convenience annotation that combines @Configuration, @EnableAutoConfiguration, and @ComponentScan.
Used to bootstrap a Spring Boot application.
Automatically configures the Spring application based on the dependencies added to the classpath.
Scans the package and its sub-packages for components and services.
Example: @SpringBootApplication public class MyApplication { public static void main(String[] args) { SpringApplic
RestController is used for RESTful web services while Controller is used for traditional web applications.
RestController returns data in JSON or XML format while Controller returns data in HTML format.
RestController uses @RestController annotation while Controller uses @Controller annotation.
RestController is used for building RESTful web services while Controller is used for building traditional web applications.
RestC...
Maven clean removes target directory and install compiles and packages the project
Maven clean removes the target directory and all the compiled classes and resources
Maven install compiles and packages the project and installs the resulting artifact into the local repository
Maven clean and install together ensure that the project is built from scratch and all dependencies are resolved
Useful when there are changes in the
To switch from one branch to another in git, use the 'git checkout' command.
Use 'git checkout' followed by the name of the branch you want to switch to.
Make sure to commit or stash any changes before switching branches.
Example: 'git checkout new-branch'
APIs can be secured using various methods such as authentication, encryption, rate limiting, and input validation.
Implement authentication using OAuth or JWT
Use HTTPS encryption to protect data in transit
Implement rate limiting to prevent DDoS attacks
Validate input data to prevent injection attacks
Regularly update and patch software to prevent vulnerabilities
Deadlock is a situation where two or more threads are blocked and waiting for each other to release resources.
Deadlock occurs when two or more threads are waiting for each other to release resources.
It can be resolved by using techniques like resource allocation graph, timeout, and prevention.
Prevention can be done by avoiding circular wait, hold and wait, and no preemption.
Example: Thread A holds resource X and waits ...
Spring filter is an interface used to intercept HTTP requests and responses.
Spring filter is used to perform tasks such as logging, security, and caching.
It can be used to modify the request or response before it reaches the controller.
Examples of Spring filters include CharacterEncodingFilter, CorsFilter, and CsrfFilter.
A Future object represents the result of an asynchronous computation in Java.
Future objects are used to retrieve the result of an asynchronous computation when it becomes available.
They provide a way to check if the computation is complete, cancel the computation, and retrieve the result.
They are commonly used in multithreaded programming and in Java's Executor framework.
Example: Future
Hibernate manages object lifecycle through three states: transient, persistent, and detached.
When an object is created, it is in the transient state.
When the object is saved using session.save() method, it becomes persistent.
When the session is closed or the object is explicitly detached using session.evict() method, it becomes detached.
Detached objects can be re-attached to a new session using session.update() or sess...
Save() method inserts a new record into the database, while persist() method can also be used to update an existing record.
save() method is used to insert a new record into the database
persist() method can also be used to insert a new record, but it can also be used to update an existing record
save() method returns the generated ID immediately, while persist() method does not
save() method can be called outside of a tra...
Merge overlapping intervals in Java
Sort the intervals based on their start time
Iterate through the intervals and merge overlapping ones
Use a stack to keep track of merged intervals
Scopes of bean refer to the visibility and lifecycle of a bean in a Spring application.
There are four scopes of bean in Spring: singleton, prototype, request, and session.
Singleton scope creates only one instance of a bean and is the default scope.
Prototype scope creates a new instance of a bean every time it is requested.
Request scope creates a new instance of a bean for each HTTP request.
Session scope creates a new i...
I applied via Naukri.com and was interviewed before Apr 2022. There were 3 interview rounds.
DSA and basic coding
Some of the top questions asked at the Ushur Technologies Software Java Engineer interview for experienced candidates -
Senior Software Engineer
5
salaries
| ₹22 L/yr - ₹44.1 L/yr |
Technical Lead
4
salaries
| ₹1 L/yr - ₹1 L/yr |
Data Science Engineer
4
salaries
| ₹12 L/yr - ₹16.5 L/yr |
Talent Acquisition Specialist
4
salaries
| ₹8 L/yr - ₹13.2 L/yr |
Director Human Resources
4
salaries
| ₹52 L/yr - ₹72 L/yr |
Freshworks
Zoho
TCS
Infosys