Flashcards
Fix incomplete Mockito stubbing
Hover (or tap) to flip
Ensure every when(... ) is followed by thenReturn/thenThrow, and avoid stubbing final/private methods.
Learn moreUnfinishedStubbingException meaning
Hover (or tap) to flip
In Mockito, occurs when a stubbing is started but not completed properly (e.g., missing thenReturn()).
Learn moreJava 21 structured concurrency idea
Hover (or tap) to flip
New concurrency features aim to make concurrent tasks safer and easier to manage as a group.
Learn moreJava 21 virtual threads
Hover (or tap) to flip
Virtual threads are lightweight threads that scale concurrency with simpler blocking-style code.
Learn moreEnhanced for loop limitation
Hover (or tap) to flip
Enhanced for is simpler but doesn’t expose the index unless you track it yourself.
Learn moreArrays and loops
Hover (or tap) to flip
Use classic for, enhanced for, or indices depending on whether you need positions.
Learn moreArrays.toString() convenience
Hover (or tap) to flip
Arrays.toString() provides readable array output without manual loops.
Learn moreArrays utility class
Hover (or tap) to flip
java.util.Arrays offers helpers like sort(), binarySearch(), equals(), and copyOf().
Learn moreAutoboxing concept
Hover (or tap) to flip
Java automatically converts between primitives and wrapper objects when needed.
Learn moreWrapper classes
Hover (or tap) to flip
Object representations of primitives (Integer, Long, Double, etc.) used in generics and collections.
Learn moreBigInteger immutability
Hover (or tap) to flip
Operations return new BigInteger instances, so the original value never changes.
Learn moreBigInteger purpose
Hover (or tap) to flip
Supports arbitrarily large integers beyond long range, with immutable operations.
Learn moreAtomicInteger: compareAndSet meaning
Hover (or tap) to flip
Atomically updates a value only if it matches an expected value (CAS).
Learn moreAtomicInteger usage
Hover (or tap) to flip
Provides lock-free, thread-safe integer operations like incrementAndGet().
Learn moreResourceBundle fallback rule
Hover (or tap) to flip
If a specific locale bundle is missing, Java falls back to more general bundles.
Learn moreResourceBundle purpose
Hover (or tap) to flip
Loads locale-specific resources (typically from .properties files) for i18n.
Learn moreLocale usage example
Hover (or tap) to flip
Choose Locale to format dates/numbers and select translations appropriate for a region.
Learn moreLocale in Java
Hover (or tap) to flip
Represents language + region and drives formatting and internationalization behavior.
Learn moreCurrency formatting tip
Hover (or tap) to flip
NumberFormat.getCurrencyInstance(locale) formats currency with correct symbol and separators.
Learn moreNumber formatting in Java
Hover (or tap) to flip