Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Functional Pipelines (flatMap)

Front

How do map() and flatMap() differ in handling streams?

map() is synchronous, flatMap() is asynchronous. The map() method synchronously transforms data, used for light computations. flatMap() handles…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

What role does backpressure play in Reactive Streams?

Backpressure helps manage the data rate between Publisher and Subscriber. Backpressure is vital in Reactive Streams to prevent…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

How does blocking the event loop affect a reactive application?

Blocking the event loop can cause performance bottlenecks. In reactive applications, the event loop must remain unblocked to…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

Why is flatMap() preferred over map() for I/O operations in reactive programming?

flatMap() can handle asynchronous I/O without blocking. In reactive programming, non-blocking I/O operations are crucial. flatMap() is suited…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

How would you explain the core purpose of the flatMap() method in Project Reactor in an interview?

flatMap() transforms each item into a Publisher and subscribes to it. In Project Reactor, flatMap() is used to…

View Card →
Flashcard Study

Java: Thread Dumps

Front

How can 'jstack' help with infinite loops?

jstack shows threads stuck in loops. Frame the concept in practical terms so you can explain it during…

View Card →
Flashcard Study

Java: Thread Dumps

Front

Why does Metaspace in the JVM matter in practice?

It stores class metadata. Frame the concept in practical terms so you can explain it during interview discussion.…

View Card →
Flashcard Study

Java: Thread Dumps

Front

How would you explain a thread dump's role in diagnosing deadlocks in an interview?

It reveals all thread states and lock ownerships. A thread dump can show which threads are waiting for…

View Card →
Flashcard Study

Java: Thread Dumps

Front

How does ZGC minimize Stop-The-World pauses?

ZGC uses concurrent threads for most GC work. ZGC is designed for low-latency applications by performing most garbage…

View Card →
Flashcard Study

Java: Thread Dumps

Front

What does a 'RUNNABLE' state indicate in a thread dump?

It means the thread is executing or ready to run. In a thread dump, a 'RUNNABLE' state shows…

View Card →