i
Persistent Systems
Filter interviews by
I applied via Naukri.com and was interviewed in May 2021. There was 1 interview round.
Microservices can communicate through synchronous or asynchronous protocols like REST, gRPC, or message brokers.
Use RESTful APIs for synchronous communication
Use message brokers like Kafka or RabbitMQ for asynchronous communication
gRPC can be used for high-performance synchronous communication
API Gateway can be used to manage communication between microservices
Consider using service mesh like Istio or Linkerd for more
SOLID principles are a set of five design principles for writing maintainable and scalable code.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open/Closed Principle: Software entities should be open for extension but closed for modification.
L - Liskov Substitution Principle: Subtypes should be substitutable for their base types.
I - Interface Segregation Principle: Clients should ...
Find second largest integer in an array without sorting or using collections.
Iterate through array and keep track of largest and second largest integers.
Compare each element with current largest and second largest integers.
Return second largest integer.
Concurrent Hash Map is a thread-safe implementation of Hash Map.
Uses multiple segments to allow concurrent access
Each segment is a separate hash table with its own lock
Segments are dynamically added or removed based on usage
Uses CAS (Compare and Swap) operation for updates
Provides higher concurrency than synchronized Hash Map
Microservices is a design pattern where an application is broken down into small, independent services that communicate with each other.
Each service is responsible for a specific task or feature
Services communicate with each other through APIs
Each service can be developed, deployed, and scaled independently
Allows for greater flexibility, agility, and resilience
Requires a strong focus on automation, monitoring, and test
HTTP error codes 400 and 500 represent client and server errors respectively.
HTTP error code 400 indicates a client-side error, such as a bad request or invalid input.
HTTP error code 500 indicates a server-side error, such as an internal server error or database connection issue.
Other common client-side errors include 401 (unauthorized), 403 (forbidden), and 404 (not found).
Other common server-side errors include 503 (
PUT is used to update an existing resource while POST is used to create a new resource.
PUT is idempotent, meaning multiple identical requests will have the same effect as a single request.
POST is not idempotent and can result in multiple resources being created if the request is sent multiple times.
PUT requires the client to send the entire updated resource while POST only requires the necessary fields to create a new ...
PUT method updates data if available, else returns success with no changes.
PUT method updates the resource if it exists, else creates a new resource
If no data is provided, the server returns a success response with no changes made
Example: PUT /users/1 with empty body will return success with no changes if user with id 1 exists
Use @PostConstruct annotation or implement CommandLineRunner interface
Use @PostConstruct annotation on a method that needs to be executed on startup
Implement CommandLineRunner interface and override run() method
Add the code that needs to be executed on startup in the method annotated with @PostConstruct or in the run() method
Example: @PostConstruct public void init() { //code to be executed on startup }
Example: public ...
The @Service annotation is a specialization of the @Component annotation and is used to indicate that a class is a service.
Both @Service and @Component annotations are used to indicate that a class is a Spring-managed component.
@Service is a specialization of @Component and is used to indicate that a class is a service layer component.
The @Service annotation is used to add a layer of abstraction between the controller ...
Many-to-many relationship in Hibernate without common columns
Create a third table with foreign keys to both tables
Use @ManyToMany annotation in both entity classes
Specify the join table name and column names in @JoinTable annotation
A composite primary key is a primary key that consists of two or more columns.
A composite primary key is used when a single column cannot uniquely identify a record.
It is created by combining two or more columns that together uniquely identify a record.
Each column in a composite primary key must be unique and not null.
Example: A table of orders may have a composite primary key consisting of order number and customer ID
What people are saying about Persistent Systems
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
Developed a web application for tracking employee attendance and performance
Implemented user authentication and authorization using Spring Security
Utilized Hibernate for database interaction and data persistence
Designed and developed RESTful APIs for frontend integration
Used AngularJS for frontend development to create interactive user interfaces
I applied via Company Website and was interviewed in Nov 2024. There were 3 interview rounds.
A standard online test conducted through one of the testing platforms.
I applied via Approached by Company and was interviewed in Oct 2024. There was 1 interview round.
posted on 30 Oct 2024
I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructor, fields, and methods, while interface cannot have any of these.
A class can extend only one abstract class, but can implement multiple interfaces.
Abstract classes are used to define a common behavior among subclasses, while interfaces are used to define a contract for classes...
Handler methods in Java are methods that are responsible for handling incoming requests and generating responses.
Handler methods are typically defined in classes annotated with @Controller or @RestController.
These methods are mapped to specific URLs using @RequestMapping or other mapping annotations.
Handler methods can have parameters such as HttpServletRequest, HttpServletResponse, or model attributes.
The return value...
ExecutorService is an interface in Java that provides a way to manage and control the execution of threads in a multithreaded environment.
It is part of the java.util.concurrent package.
It provides methods to submit tasks for execution, manage thread pools, and control the execution of tasks.
It allows for the execution of tasks asynchronously and provides features like scheduling, cancellation, and monitoring of tasks.
E...
JPA is a Java specification for mapping Java objects to relational databases.
JPA stands for Java Persistence API
It provides a way to map Java objects to database tables and vice versa
JPA simplifies the development of data access layer in Java applications
It supports object-relational mapping (ORM) and allows developers to work with entities, relationships, and queries in a more object-oriented way
PreparedStatement is used in Java to execute parameterized SQL queries to prevent SQL injection attacks.
PreparedStatement is a subinterface of Statement in Java.
It is used to execute parameterized SQL queries.
It helps prevent SQL injection attacks by automatically escaping special characters.
Example: PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM users WHERE username = ?");
Program to find missing numbers from Array
Iterate through the array and store each number in a HashSet
Then iterate from 1 to the length of the array and check if each number exists in the HashSet
If a number is not found in the HashSet, it is a missing number
I applied via Campus Placement and was interviewed in Apr 2024. There were 2 interview rounds.
Aptitude questions and some questions from PostgreSQL.
HashMap, LinkedList, HashSet, and Heap are data structures commonly used in Java for storing and organizing data.
HashMap: key-value pairs, uses hashing to store and retrieve elements efficiently (e.g. HashMap
LinkedList: linear data structure, elements are stored in nodes with pointers to the next node (e.g. LinkedList
HashSet: collection of unique elements, uses hashing to ensure uniqueness (e.g. Hash...
Comparable is an interface used for natural ordering, while Comparator is used for custom ordering in Java.
Comparable interface is used to define the natural ordering of objects. It is implemented by the class whose objects are to be sorted.
Comparator interface is used to define custom ordering of objects. It is implemented by a separate class that compares objects based on specific criteria.
Example: Sorting a list of ...
List allows duplicate elements and maintains insertion order, while Set does not allow duplicates and does not maintain order.
List can contain duplicate elements, Set cannot
List maintains insertion order, Set does not guarantee order
List is implemented by classes like ArrayList, LinkedList, Set is implemented by classes like HashSet, TreeSet
Example: List
Software Engineer
4.3k
salaries
| ₹2.5 L/yr - ₹9.5 L/yr |
Senior Software Engineer
3.7k
salaries
| ₹5 L/yr - ₹13 L/yr |
Lead Engineer
3k
salaries
| ₹7.2 L/yr - ₹30 L/yr |
Lead Software Engineer
2.9k
salaries
| ₹7.3 L/yr - ₹21 L/yr |
Project Lead
1.8k
salaries
| ₹13.2 L/yr - ₹38.8 L/yr |
Cognizant
TCS
IBM
Wipro