This document contains a comprehensive list of interview questions covering Java, Spring Boot, Microservices, and Cloud technologies. It includes topics such as Core Java concepts, functional programming, multithreading, exception handling, Java collections, design patterns, Spring Boot features, microservices architecture, and DevOps practices. The questions are designed to assess knowledge and understanding of key principles and practices in these areas.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views4 pages
Core Java Interview Questions
This document contains a comprehensive list of interview questions covering Java, Spring Boot, Microservices, and Cloud technologies. It includes topics such as Core Java concepts, functional programming, multithreading, exception handling, Java collections, design patterns, Spring Boot features, microservices architecture, and DevOps practices. The questions are designed to assess knowledge and understanding of key principles and practices in these areas.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Java, Spring Boot, Microservices, and Cloud Interview Questions
Java Interview Questions
### Core Java & OOP Concept
- What is the difference between a class and an object? - Explain OOP principles (Encapsulation, Inheritance, Polymorphism, Abstraction) with examples. - What is method overloading vs. method overriding? - How does Java handle memory management (Heap vs. Stack, Garbage Collection)? - Explain shallow copy vs. deep copy in Java. - What are static methods and variables, and when should you use them?
### Comparator vs. Comparable
- What is the difference between Comparator and Comparable? - How do you sort a list using Comparator? - Can a class implement both Comparator and Comparable? - How do you handle multiple sorting criteria in Java?
### Functional Programming & Java 8+ Features
- What are functional interfaces, and how are they used? - Explain filter, map, reduce operations in Java Streams. - How do you handle parallel streams, and when should you use them? - What is the difference between findFirst() and findAny()? - Can you modify a collection while iterating using streams? - What are default and static methods in interfaces? - What is the Record class in Java 14+? - How does Optional help in avoiding NullPointerExceptions? - Difference between map() and flatMap()?
### Multithreading & Concurrency
- Difference between Thread vs. Runnable? - How do synchronized methods work? - Explain volatile and final keywords. - Difference between wait(), notify(), and notifyAll()? - How does ThreadPoolExecutor work? - What is ForkJoinPool, and when should you use it? - Difference between synchronized collections and ConcurrentHashMap? - What is CompletableFuture, and how does it improve async programming? - What is ReentrantLock, and how does it work? - How does the Executor Framework improve thread management? - What is ThreadLocal, and when should you use it?
### Exception Handling
- Checked vs. unchecked exceptions? - Can a finally block be skipped? - What happens if you call return inside a finally block? - How does try-with-resources improve exception handling? - How do you create a custom exception?
### Java Collections & Data Structures
- How does HashMap work internally? - Difference between ArrayList vs. LinkedList? - What is Fail-Fast vs. Fail-Safe in iterators? - How does ConcurrentHashMap prevent race conditions? - Difference between TreeMap, HashMap, and LinkedHashMap? - What is WeakHashMap, and when is it useful? - What is CopyOnWriteArrayList, and why use it?
### JVM & Memory Management
- Difference between JDK, JRE, and JVM? - Explain Java Memory Model (Heap, Stack, Metaspace, etc.). - How does Garbage Collection (GC) work? - What are memory leaks, and how do you detect them? - How does Java handle OutOfMemoryError?
### Design Patterns
- What are Singleton, Factory, and Builder patterns? - Difference between composition vs. inheritance? - What is the Proxy Pattern, and how is it used in Spring Boot? - What are SOLID principles, and why are they important?
### Spring Boot & Advanced Java
- What are key annotations in Spring Boot? - Difference between @Controller vs. @RestController? - What is the Bean Lifecycle in Spring? - How does Spring Boot handle dependency injection? - What are proxies in Spring, and why are they needed? - How does @Transactional work in Spring Boot? - Difference between @Component, @Service, and @Repository? - How does Spring Boot Auto-Configuration work? - What is Spring Boot Actuator, and why is it useful? - How does Spring handle transactions using @Transactional?
### Microservices & Cloud Technologies
- What are the benefits of Microservices over Monolithic Architecture? - Explain Spring Cloud components (Eureka, Zuul, Config Server). - How do OAuth2 and JWT work in security? - What are Idempotent APIs, and why are they important? - How do you handle distributed transactions in microservices? - Explain Resilience patterns (Circuit Breaker, Bulkhead, Retry). - What makes an API RESTful? - Difference between GET, POST, PUT, PATCH, DELETE? - What is HATEOAS, and why is it useful? - How does GraphQL compare to REST? - How do you optimize API performance? - What is Rate Limiting, and how do you implement it?
### DevOps, CI/CD & Deployment
- How does Docker help in Java deployment? - What is Kubernetes, and how does it manage Java apps? - Explain Jenkins Pipeline for Java projects. - What are Logging and Monitoring best practices?