0% found this document useful (0 votes)
7 views3 pages

Java and Spring Core Concepts Explained

The document provides a series of questions and answers related to Java Core, Spring Boot, Spring MVC, Spring Data, Microservices, Kafka, Docker, Kubernetes, Security, Design Patterns, and REST APIs. Key concepts include thread safety in collections, dependency injection in Spring, API Gateway functions, and the importance of configuration management. It also touches on performance considerations in data fetching and message handling in distributed systems.

Uploaded by

mohit beni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Java and Spring Core Concepts Explained

The document provides a series of questions and answers related to Java Core, Spring Boot, Spring MVC, Spring Data, Microservices, Kafka, Docker, Kubernetes, Security, Design Patterns, and REST APIs. Key concepts include thread safety in collections, dependency injection in Spring, API Gateway functions, and the importance of configuration management. It also touches on performance considerations in data fetching and message handling in distributed systems.

Uploaded by

mohit beni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

Topic Question Answer

Java Core Explain th HashMap is not thread-safe and allows one null key, multiple null values. ConcurrentHashMap is thread
Java Core What is thefinal: keyword to mark variable/method/class as immutable. finally: block executed after try/catch. fina
Java Core Explain th JVM has Method Area, Heap, Stack, PC Registers, Native Method Stack. Heap stores objects, stack store
Java Core What is theInterfaces support multiple inheritance, cannot maintain state except static/final constants. Abstract cla
Java Core Explain GarGC uses Mark-Sweep, Copying, Mark-Compact, and G1 collector with region-based memory manageme
Spring BooWhat is DeDI is a design pattern where the container injects required dependencies instead of creating them manu
Spring BooExplain theInstantiation → Populate properties → BeanNameAware → BeanFactoryAware → Pre-initialization → P
Spring BooWhat is th @Component is generic. @Service marks service layer. @Repository adds persistence exception transla
Spring BooExplain SprSpring Boot auto-configures application components based on classpath, property settings, and conditio
Spring BooWhat is th It maps configuration properties from [Link]/properties to Java POJOs.
Spring MV Explain DisDispatcherServlet is the front controller in Spring MVC routing all HTTP requests to appropriate handler
Spring MV Difference @RestController = @Controller + @ResponseBody. Returns JSON/XML directly.
Spring Dat How does JJPA uses EntityManager and transaction boundaries managed via @Transactional.
Spring Dat What is th Occurs when fetching child collections lazily results in many queries. Solved with fetch joins or entity gra
Spring Dat Difference LAZY loads relationships only when needed; EAGER loads immediately, possibly causing performance iss
MicroserviExplain AP API Gateway acts as a single entry point aggregating multiple backend services.
MicroserviWhat is CirCircuit Breaker prevents repeated calls to a failing service. Tools: Resilience4j, Hystrix.
MicroserviExplain serService discovery (Eureka/Consul) helps services dynamically register and find each other.
Kafka What is th Consumer groups allow scalability; partitions distribute data, and only one consumer from a group read
Kafka What is id Ensures messages are not duplicated even on retries by using sequence numbers.
Docker Explain DoContainers share OS kernel, lightweight. VMs include entire OS, heavier.
Docker What is DocScript defining how to build an image using layers.
Kubernete Explain Po Pod is the smallest deployable unit. Deployment manages scaling/rolling updates of Pods.
Kubernete What is CoConfigMap stores plaintext config. Secret stores base64-encoded sensitive data.
Security Explain OAUser → Auth Server (code) → Backend exchanges code for access token → API access.
Security What is CSProtects against forged POST requests. Spring uses CSRF token verification.
Design PatExplain SinSingleton ensures one instance. Thread-safe using double-checked locking with volatile variable.
REST API What is id Operations that can be repeated without changing result (e.g., PUT, DELETE).
REST API Explain HAHypermedia as the Engine of Application State: responses contain links guiding clients for next actions.
ConcurrentHashMap is thread-safe using segmented locking, disallows null keys/values, and provides better concurrency performance.
executed after try/catch. finalize(): method called by GC before object removal (deprecated).
eap stores objects, stack stores frames, method area stores class metadata.
tic/final constants. Abstract classes can have state, constructors, and partial implementation.
on-based memory management.
nstead of creating them manually.
Aware → Pre-initialization → Post processors → Init methods → Bean Ready → Destroy methods.
persistence exception translation.
property settings, and conditions.

quests to appropriate handlers.

ed with fetch joins or entity graphs.


ssibly causing performance issues.

e4j, Hystrix.
find each other.
e consumer from a group reads one partition.

updates of Pods.

→ API access.

g with volatile variable.

iding clients for next actions.


concurrency performance.

You might also like