Persistent Systems Interview Questions
Pune-headquartered product engineering company with centres in Nagpur, Goa, and Bangalore. Known for ISV partnerships and product development. Interviews focus on Java, Spring Boot, microservices, and SQL with strong emphasis on code quality and cloud-native patterns.
#1What is the difference between == and .equals() in Java?
#2What is the difference between abstract class and interface?
#3Explain the SOLID principles.
#4How does HashMap work internally?
#5What is the difference between HashMap and ConcurrentHashMap?
#6Explain Java Memory Model: Heap, Stack, and Metaspace.
#7What is the volatile keyword in Java?
#8What are functional interfaces and lambda expressions in Java 8?
#9What is Optional and when should you use it?
#10Explain the Stream API and intermediate vs terminal operations.
#11What is the difference between checked and unchecked exceptions?
#12What is the difference between String, StringBuilder, and StringBuffer?
#13What is method overloading vs method overriding?
#14What is the difference between final, finally, and finalize?
#15What are Java records (Java 16+)?
#16What is the Executor framework and when would you use it over raw Threads?
#17What is encapsulation and how is it achieved in Java?
#18What is polymorphism? Explain runtime vs compile-time polymorphism.
#19What is the difference between composition and inheritance?
#20What is a marker interface? Give examples.
#21What are the design patterns most commonly asked in Java interviews?
#22What is the difference between ArrayList and LinkedList?
#23What is the difference between HashSet, LinkedHashSet, and TreeSet?
#24What is the difference between HashMap and TreeMap?
#25What is the contract between equals() and hashCode()?
#26What is the difference between fail-fast and fail-safe iterators?
#27What is CopyOnWriteArrayList and when should you use it?
#28How does PriorityQueue work and when would you use it?
#29What is the difference between sleep(), wait(), and yield()?
#30What are atomic classes (AtomicInteger, AtomicReference)? How do they work?
#31What is a CountDownLatch vs CyclicBarrier?
#32What is the difference between JDK, JRE, and JVM?
#33What is the String pool and how does string interning work?
#34What are sealed classes (Java 17)?
#35What is pattern matching for instanceof (Java 16)?
#36What are text blocks (Java 15)?
#37What is the difference between map() and flatMap() in streams?
#38What are method references in Java 8?
#39What is the difference between Comparable and Comparator?
#40What is Stream.collect() and what are common Collectors?
#41What is try-with-resources and how does it work?
#42What is the difference between throw and throws?
#43What is exception chaining and why is it important?
#44What is the difference between Java IO and NIO?
#45What is reflection in Java and when is it used?
#46What is the difference between deep copy and shallow copy?
#47What is autoboxing and unboxing? What are the performance implications?
#48What are enums in Java and what advanced features do they support?
#49What is the difference between static and instance initializer blocks?
#50What is the difference between String.format() and String.formatted()?
#51What is the var keyword (Java 10) and when should you use it?
#52What is the difference between an inner class, static nested class, and anonymous class?
#53What are the new switch expressions (Java 14)?
#54What is the difference between Runnable, Callable, and Future?
#55What is the difference between String.equals() and String.equalsIgnoreCase()?
#56What is the difference between Iterator and ListIterator?
#57What is the difference between abstract class and concrete class?
#58How do you handle NullPointerException in Java?
#59What is the Collections utility class? What are its most important methods?
#60What is the difference between Deque and Queue?
#61What is the difference between checked and unchecked exceptions — best practices for APIs?
#62What is the ternary operator and the null-coalescing equivalent in Java?
#63What is the difference between == null check and Objects.isNull()?
#64What is the difference between interface default methods and abstract class methods?
#65What is the difference between Iterable and Iterator?
#66What are the best practices for writing clean Java code?
#67What is the difference between a process and a thread in Java?
#68What is a race condition and how do you prevent it?
#69What is the difference between HashMap.computeIfAbsent() and getOrDefault()?
#70What is the purpose of the transient keyword?
#71What is the difference between i++ and ++i in Java?
#72What are the Java 8 Date/Time APIs and why were they introduced?
#73What is the difference between HashMap.put() and HashMap.putIfAbsent()?
#74What is the difference between String.valueOf() and toString()?
#75What is an immutable class and how do you create one?
#76What is the covariant return type in Java?
#77What is the difference between static and instance methods?
#78What is the difference between Predicate.and(), Predicate.or(), and Predicate.negate()?
#79What is the Observer pattern and how is it implemented in Java?
#80What is the Strategy pattern in Java?
#81What are the key differences between Java 8, 11, 17, and 21?
#82What is auto-configuration in Spring Boot?
#83What is @SpringBootApplication and what does it do?
#84What is IoC (Inversion of Control) and Dependency Injection?
#85What is the difference between @Component, @Service, and @Repository?
#86What is the difference between @Controller and @RestController?
#87How does Spring Boot handle exceptions globally?
#88What is Spring Boot Actuator?
#89What is the difference between @Bean and @Component?
#90Explain Spring Bean scopes.
#91How do you configure Spring profiles?
#92What is @Async in Spring Boot and how does it work?
#93What is Spring Data JPA and how does it simplify data access?
#94How does Spring Boot externalized configuration work?
#95What is Spring Cache Abstraction and how do you use it?
#96What are Spring Boot starters and why are they useful?
#97How do you write integration tests in Spring Boot?
#98What is the Spring ApplicationContext and how does it differ from BeanFactory?
#99What is the @PostConstruct and @PreDestroy lifecycle?
#100What is @Qualifier and when do you need it?
#101What is @ConfigurationProperties and how does it differ from @Value?
#102What is Spring Boot's embedded server and how do you switch from Tomcat to Undertow?
#103What is Spring's @EventListener and ApplicationEvent?
#104What is Spring Boot DevTools?
#105What is the difference between @RequestParam, @PathVariable, and @RequestBody?
#106How do you implement request validation in Spring Boot?
#107What is ResponseEntity and when should you use it?
#108What is content negotiation in Spring MVC?
#109How do you implement pagination and sorting in Spring Boot?
#110How do you version a REST API in Spring Boot?
#111What is the difference between findById() and getById() in Spring Data JPA?
#112What is the difference between @OneToMany with fetch LAZY vs EAGER?
#113What is CSRF and how does Spring Security handle it?
#114What is the difference between @Secured, @PreAuthorize, and @RolesAllowed?
#115What is CORS and how do you configure it in Spring Boot?
#116What is MockMvc and how do you use it?
#117What is @MockBean vs @Mock in Spring Boot tests?
#118What is @DataJpaTest and how does it differ from @SpringBootTest?
#119What is Testcontainers and how does it improve Spring Boot tests?
#120What is Micrometer and how does it integrate with Spring Boot Actuator?
#121How do you implement custom health indicators in Spring Boot?
#122What is graceful shutdown in Spring Boot and how do you configure it?
#123What is @ControllerAdvice and how does it work?
#124What is Spring's @Scheduled and how do you configure it?
#125What is CommandLineRunner and ApplicationRunner?
#126What is Spring Boot's banner and how can you customize it?
#127What is Spring Retry and how do you use it?
#128What is @Transactional readOnly = true and what does it optimize?
#129How do you handle file uploads in Spring Boot?
#130What is the difference between @RequestMapping and specific mapping annotations?
#131What is the difference between @Transactional on a class vs a method?
#132What is Spring Boot's connection pool? How do you tune HikariCP?
#133What is Spring Boot's auto-configuration for messaging (RabbitMQ / Kafka)?
#134How does Spring Boot handle environment-specific properties?
#135What is the purpose of @EnableJpaAuditing?
#136What is the difference between eager and lazy initialization in Spring Boot?
#137What is Spring Boot's support for caching with Redis?
#138What is Spring Boot's support for MongoDB?
#139What is the difference between @Valid and @Validated in Spring?
#140What is Spring Data REST and how does it differ from Spring MVC?
#141What is the difference between @Inject and @Autowired?
#142What is Flyway and how does it integrate with Spring Boot?
#143What are Spring Boot's management endpoints and how do you secure them?
#144What is Spring Boot's Docker image building support?
#145What is the difference between @SpringBootTest(webEnvironment) options?
#146What is Spring Boot's support for SSE (Server-Sent Events)?
#147What are microservices and what problems do they solve?
#148What is an API Gateway and what does it do?
#149How do microservices communicate?
#150What is service discovery in microservices?
#151What is the Circuit Breaker pattern and how does it prevent cascading failures?
#152What is distributed tracing and why is it important?
#153What is the Strangler Fig pattern for microservices migration?
#154How do you manage configuration in microservices?
#155What are the 12-Factor App principles?
#156What is event-driven architecture and when should you use it?
#157How do you test microservices effectively?
#158What is the circuit breaker pattern?
#159What is service discovery and how does it work?
#160What is the Bulkhead pattern?
#161What is the Retry pattern and how do you implement it safely?
#162What is the Backend for Frontend (BFF) pattern?
#163How do you implement distributed tracing?
#164What is the Strangler Fig pattern for migrating a monolith?
#165How do you version microservice APIs?
#166What is the Sidecar pattern?
#167What is a dead letter queue and why is it important?
#168How do you implement health checks in microservices?
#169What are the 12-Factor App principles?
#170What is the Ambassador pattern in microservices?
#171What is the Throttling pattern and how does it differ from rate limiting?
#172How do you test microservices?
#173What is service isolation and why is it important?
#174What is an Event-Driven Architecture?
#175What is the Role of API composition in microservices?
#176What is graceful degradation in microservices?
#177How do you implement logging in a microservices environment?
#178How do you handle timeouts in microservices?
#179What is the Scatter-Gather pattern?
#180What is the difference between a microservice and a nanoservice?
#181How do you implement canary deployments in microservices?
#182What is a Service Registry?
#183What is blue-green deployment and how does it work?
#184What is the Aggregator pattern?
#185How do microservices handle configuration management?
#186What is the Proxy pattern in microservices?
#187What is Kafka and why is it popular in microservices?
#188What is the difference between a monolith, microservices, and modular monolith?
#189What is a composite microservice?
#190How do you deal with "chatty" microservices?
#191What is the Anti-Corruption Layer pattern?
#192What are the common pitfalls of microservices adoption?
#193What is the difference between orchestration and choreography?
#194What is load shedding?
#195What is the difference between gRPC and REST for inter-service communication?
#196What is the Gateway Aggregation pattern vs Gateway Routing?
#197What is the Open Host Service pattern?
#198How do you implement service-level SLOs in microservices?
#199What is the Claim Check pattern?
#200What is the difference between horizontal and vertical scaling for microservices?
#201What is the role of a message schema registry?
#202How do you handle service discovery with Kubernetes?
#203What is the Publisher-Subscriber (Pub-Sub) pattern?
#204How do you use feature toggles in microservices?
#205What is polyglot persistence in microservices?
#206What is the Retry pattern and when should you NOT retry?
#207When should you NOT use microservices?
#208What are the different types of SQL JOINs?
#209How does indexing work in MySQL (InnoDB)?
#210What is a covering index?
#211How do you use EXPLAIN to analyze a query?
#212What are CTEs (Common Table Expressions) and when should you use them?
#213What is the N+1 query problem and how do you fix it?
#214What is a deadlock in MySQL and how does it occur?
#215What is the difference between DELETE, TRUNCATE, and DROP?
#216What is database normalization?
#217What is GROUP BY vs HAVING in SQL?
#218What is a stored procedure and when should you use it?
#219What is the difference between UNION and UNION ALL?
#220What is the difference between a clustered and a non-clustered index?
#221How does MySQL handle AUTO_INCREMENT?
#222What are covering indexes and how do they improve performance?
#223What is the EXPLAIN output and how do you read it?
#224What are database triggers and when should you avoid them?
#225What is a foreign key constraint and what are its performance implications?
#226What is the difference between CHAR and VARCHAR?
#227How do you implement full-text search in MySQL?
#228What is the difference between MyISAM and InnoDB?
#229What are MySQL stored procedures and when should you use them?
#230How do you perform a slow query analysis in MySQL?
#231What is the difference between HAVING and WHERE?
#232What is MySQL's query cache and why was it removed?
#233How do you back up a MySQL database without downtime?
#234What is the difference between optimistic and pessimistic locking in MySQL?
#235What is the difference between IN, EXISTS, and JOIN for subqueries?
#236How do you implement pagination in MySQL efficiently?
#237What are the different types of JOINs in MySQL?
#238What is the difference between a view and a materialized view?
#239What are common MySQL performance anti-patterns?
#240What is a generated column in MySQL?
#241What are the best practices for MySQL schema design?
#242How do you use MySQL's JSON column type?
#243What is ProxySQL and how is it used?
#244How do you detect and fix index fragmentation in MySQL?
#245What are the MySQL 8.0 improvements over MySQL 5.7?
#246How do you design a schema for audit logging?
#247What is the difference between COUNT(*), COUNT(1), and COUNT(col)?
#248How do you implement soft delete in MySQL?
#249What is the difference between CHAR, VARCHAR, TEXT, and BLOB?
#250What is the difference between schema-on-write and schema-on-read?
#251How do you handle time zones in MySQL?
#252What is the difference between a unique constraint and a unique index?
#253How do you monitor MySQL in production?
#254What are window functions and how do you use them?
#255What is the difference between a primary key and a unique key?
#256How do you use MySQL's event scheduler?
#257What is the EXPLAIN ANALYZE command?
#258How do you handle database connection failures in application code?
#259What is the MySQL query execution order?
#260How do you scale MySQL reads?
#261What is the difference between row-based and statement-based replication?
#262How do you use CTEs (Common Table Expressions) effectively?
#263What is the difference between TRUNCATE, DELETE, and DROP?
#264How do you implement optimistic locking with versioning in MySQL?
#265What are the different ways to copy a table in MySQL?
#266What is the purpose of the information_schema?
#267How do you implement full-table search across millions of rows efficiently?
#268What is the max_connections parameter and how do you tune it?
#269What is the difference between ROLLUP and CUBE in SQL?
#270How do you handle NULL values in MySQL queries?
#271What is the difference between a read and a write transaction?
#272What is the mysql.user table and how does MySQL authentication work?
#273What are MySQL's data types for storing money?
#274What is the difference between DATETIME and TIMESTAMP in MySQL?