Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Modern Date and Time

Front

Why does the difference between Duration and Period matter in practice?

Duration measures time-based amounts in seconds and nanoseconds, Period in years, months, days. Use Duration for precise time…

View Card →
Flashcard Study

Java: Modern Date and Time

Front

How does java.time handle time zones with ZonedDateTime?

ZonedDateTime combines LocalDateTime with ZoneId for timezone-specific timestamps. ZonedDateTime allows you to represent date and time with a…

View Card →
Flashcard Study

Java: Modern Date and Time

Front

Why use java.time.Instant over java.util.Date?

Instant is immutable and thread-safe, representing a point in time in UTC. Instant provides a cleaner API for…

View Card →
Flashcard Study

Java: Migration Strategy

Front

How would you explain the safest modernization strategy in an interview?

Modernize one verified seam at a time while keeping public contracts stable. Incremental refactors are easier to review…

View Card →
Flashcard Study

Java: Migration Strategy

Front

Why is exhaustive compiler checking valuable?

A new variant forces the code to be updated everywhere that must handle it. When a sealed hierarchy…

View Card →
Flashcard Study

Java: Migration Strategy

Front

How would you explain a verified seam in modernization in an interview?

A small, well-understood area whose behavior is already clear and testable. DTOs, value objects, localized switches, and date…

View Card →