Interactive interview prep · 31 questions across the JD — Java, Spring Boot & Spring Cloud, Kafka & event-driven architecture, microservices/serverless, Kubernetes & Docker, MongoDB & Vault, AI in the SDLC, and observability (Splunk/Dynatrace) — with detailed explanations.
Press Check answer on each question to see whether you got it right — every check is timestamped and recorded in your Activity log below.
Each attempt is saved under its own name — load, rename, or delete them below. Difficulty / calculator tags are shared across all attempts. Numeric answers accept equivalent forms (e.g. 4/3 or 1.333).
The timer is stopped. Questions are hidden until you resume.
Medium Which statement about Java String is correct?
Answer: A — Strings are immutable — any "modification" creates a new String object
concat return a new object.Medium A checked exception in Java is one that:
Answer: D — Extends Exception (but not RuntimeException) and must be caught or declared with throws
IOException) are enforced at compile time. Unchecked (RuntimeException) are not.Hard In Java concurrency, volatile guarantees:
Answer: A — Visibility of a variable's latest value across threads — but not atomicity of compound operations
volatile ensures reads/writes see the latest value (happens-before), but i++ is read-modify-write and still needs synchronized or an Atomic* type for atomicity.Medium The core value of Spring Boot is:
Answer: A — Auto-configuration, starter dependencies, and an embedded server for rapid, standalone production apps
Medium What does @RestController add over @Controller?
Answer: D — It combines @Controller with @ResponseBody, so methods return data (e.g., JSON) directly instead of a view name
@RestController is the standard for REST APIs — return values are serialized to the response body rather than resolved as views.Medium Spring Cloud Config provides:
Answer: C — Centralized, externalized configuration for microservices, with per-environment and refreshable properties
Medium In a Spring Cloud microservices setup, service discovery is typically provided by:
Answer: B — A registry such as Netflix Eureka (or Consul) that services register with and look each other up through
Hard The purpose of the circuit breaker pattern (e.g., Resilience4j) is to:
Answer: D — Fail fast and stop calling an unhealthy downstream service, preventing cascading failures and giving it time to recover
Medium In Kafka, a partition gives you:
Answer: B — Ordering guaranteed within the partition, plus parallelism (partitions are consumed independently)
Medium Within a Kafka consumer group:
Answer: B — Each partition is consumed by exactly one consumer in the group, so adding consumers (up to the partition count) scales consumption
Medium By default, Kafka delivery semantics are:
Answer: B — At-least-once — consumers may see duplicates, so processing should be idempotent (exactly-once needs idempotent producer + transactions)
Medium A primary benefit of event-driven architecture is:
Answer: D — Loose coupling and asynchronous processing — producers and consumers scale and evolve independently
Hard If a Kafka consumer commits the offset before it finishes processing a message and then crashes, the result is:
Answer: B — Possible message loss (at-most-once) — the message is marked consumed but was never fully processed
Medium A key trade-off of microservices is:
Answer: C — Independent deployment and scaling per service, at the cost of added distributed-system complexity (network, consistency, observability)
Medium A common drawback of serverless (FaaS) functions is:
Answer: B — Cold-start latency when a function scales from zero, plus execution time/stateless constraints
Hard To coordinate a transaction that spans several microservices (each with its own database), you'd use:
Answer: D — The Saga pattern — a sequence of local transactions with compensating actions on failure (choreography or orchestration)
Medium How does a Docker container differ from a virtual machine?
Answer: D — A container shares the host OS kernel and packages just the app + dependencies, so it's lighter and faster to start than a full VM
Medium In Kubernetes, a Pod is:
Answer: D — The smallest deployable unit — one or more containers that share network and storage
Medium Which Kubernetes object manages a replica set of Pods and performs rolling updates?
Answer: D — Deployment
Medium A Kubernetes Service provides:
Answer: C — A stable network endpoint and load balancing to a changing set of Pods (selected by labels)
Hard A Kubernetes readiness probe (vs a liveness probe) determines:
Answer: A — Whether a Pod is ready to receive traffic — if it fails, the Pod is removed from Service endpoints but not restarted
Medium A Horizontal Pod Autoscaler (HPA):
Answer: B — Automatically adjusts the number of Pod replicas based on observed metrics like CPU utilization or custom metrics
Medium MongoDB is best described as:
Answer: A — A document (NoSQL) database storing flexible, JSON-like (BSON) documents
Medium MongoDB is often a good fit when:
Answer: D — The schema is flexible/evolving and data maps naturally to nested documents accessed together
Medium HashiCorp Vault is used to:
Answer: A — Centrally manage secrets — store/rotate credentials, issue dynamic short-lived secrets, and provide encryption-as-a-service
Hard Which is the secure practice for a service's database password?
Answer: C — Fetch it at runtime from a secrets manager like Vault (or an injected secret), never committing it to source control
Medium When using AI-assisted coding tools (e.g., Copilot), a responsible practice is:
Answer: C — Treat generated code as a draft — review it for correctness, security, and licensing before merging
Medium Which are legitimate ways to integrate AI/ML into the SDLC? Select all that apply.
Answer: A, B, C, D
Medium Splunk and Dynatrace are primarily:
Answer: B — Observability tools — Splunk for log aggregation/search/analytics, Dynatrace for application performance monitoring (APM)
Hard To pinpoint which microservice caused end-to-end latency for a slow request, you rely on:
Answer: D — Distributed tracing — a correlation/trace ID follows the request across services (via an APM like Dynatrace or OpenTelemetry)
Medium The three pillars of observability are: Select all that apply.
Answer: A, B, C