KPIT Interview Questions
Pune-headquartered company specialising in automotive and mobility software. Backend roles test Java, Spring Boot APIs, and database design. Expect questions on software quality, connectivity protocols, and embedded system integration.
#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 the different types of SQL JOINs?
#148How does indexing work in MySQL (InnoDB)?
#149What is a covering index?
#150How do you use EXPLAIN to analyze a query?
#151What are CTEs (Common Table Expressions) and when should you use them?
#152What is the N+1 query problem and how do you fix it?
#153What is a deadlock in MySQL and how does it occur?
#154What is the difference between DELETE, TRUNCATE, and DROP?
#155What is database normalization?
#156What is GROUP BY vs HAVING in SQL?
#157What is a stored procedure and when should you use it?
#158What is the difference between UNION and UNION ALL?
#159What is the difference between a clustered and a non-clustered index?
#160How does MySQL handle AUTO_INCREMENT?
#161What are covering indexes and how do they improve performance?
#162What is the EXPLAIN output and how do you read it?
#163What are database triggers and when should you avoid them?
#164What is a foreign key constraint and what are its performance implications?
#165What is the difference between CHAR and VARCHAR?
#166How do you implement full-text search in MySQL?
#167What is the difference between MyISAM and InnoDB?
#168What are MySQL stored procedures and when should you use them?
#169How do you perform a slow query analysis in MySQL?
#170What is the difference between HAVING and WHERE?
#171What is MySQL's query cache and why was it removed?
#172How do you back up a MySQL database without downtime?
#173What is the difference between optimistic and pessimistic locking in MySQL?
#174What is the difference between IN, EXISTS, and JOIN for subqueries?
#175How do you implement pagination in MySQL efficiently?
#176What are the different types of JOINs in MySQL?
#177What is the difference between a view and a materialized view?
#178What are common MySQL performance anti-patterns?
#179What is a generated column in MySQL?
#180What are the best practices for MySQL schema design?
#181How do you use MySQL's JSON column type?
#182What is ProxySQL and how is it used?
#183How do you detect and fix index fragmentation in MySQL?
#184What are the MySQL 8.0 improvements over MySQL 5.7?
#185How do you design a schema for audit logging?
#186What is the difference between COUNT(*), COUNT(1), and COUNT(col)?
#187How do you implement soft delete in MySQL?
#188What is the difference between CHAR, VARCHAR, TEXT, and BLOB?
#189What is the difference between schema-on-write and schema-on-read?
#190How do you handle time zones in MySQL?
#191What is the difference between a unique constraint and a unique index?
#192How do you monitor MySQL in production?
#193What are window functions and how do you use them?
#194What is the difference between a primary key and a unique key?
#195How do you use MySQL's event scheduler?
#196What is the EXPLAIN ANALYZE command?
#197How do you handle database connection failures in application code?
#198What is the MySQL query execution order?
#199How do you scale MySQL reads?
#200What is the difference between row-based and statement-based replication?
#201How do you use CTEs (Common Table Expressions) effectively?
#202What is the difference between TRUNCATE, DELETE, and DROP?
#203How do you implement optimistic locking with versioning in MySQL?
#204What are the different ways to copy a table in MySQL?
#205What is the purpose of the information_schema?
#206How do you implement full-table search across millions of rows efficiently?
#207What is the max_connections parameter and how do you tune it?
#208What is the difference between ROLLUP and CUBE in SQL?
#209How do you handle NULL values in MySQL queries?
#210What is the difference between a read and a write transaction?
#211What is the mysql.user table and how does MySQL authentication work?
#212What are MySQL's data types for storing money?
#213What is the difference between DATETIME and TIMESTAMP in MySQL?