All fields

“JRE & Memory” in Information Technology

22 questions across 2 technologies.

Information Technology

22 questions in 2 technologies

#QuestionTechnologyTopicLevel
1What is the role of Span<T> and Memory<T> in .NET, and why can't Span<T> be used inside an async method? C# › Arrays, Span<T> & Memory<T>C#Arrays, Span<T> & Memory<T>Advanced
2What is garbage collection in the JVM, and what fundamental problem does it solve compared to manual memory management (like in C/C++)? Java › Garbage CollectionJavaGarbage CollectionBeginner
3What is the difference between Error and Exception in Java's Throwable hierarchy, and why should application code generally avoid catching Error subclasses like OutOfMemoryError or StackOverflowError? Java › ExceptionsJavaExceptionsIntermediate
4How does an inner class's implicit reference to its outer instance create a potential memory leak risk, and in what specific scenario does this become a genuine practical concern? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesIntermediate
5How does the Java Memory Model's happens-before relationship formally define when changes made by one thread are guaranteed to be visible to another thread, and what role does the volatile keyword play? Java › Concurrency & ThreadsJavaConcurrency & ThreadsAdvanced
6How would you implement memory-mapped file I/O using MappedByteBuffer, and what performance advantage does this provide for very large files compared to traditional stream-based reading? Java › I/O & NIOJavaI/O & NIOAdvanced
7What is the role of the ClassLoader in the JVM, and what are the three built-in bootstrap/platform/application class loaders? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationBeginner
8What does it mean for an object to be 'eligible for garbage collection' in terms of reachability from GC roots? Java › Garbage CollectionJavaGarbage CollectionBeginner
9What is the parent delegation model in Java class loading, and why is it important for security and consistency? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationIntermediate
10What are the phases of class loading (loading, linking, initialization), and what specifically happens during each? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationIntermediate
11What are the atomic classes in java.util.concurrent.atomic (AtomicInteger, AtomicLong, AtomicReference), and how do they achieve thread-safe operations without traditional locking? Java › Concurrency & ThreadsJavaConcurrency & ThreadsIntermediate
12How does the generational hypothesis (most objects die young) inform the JVM's generational heap structure (young generation, old generation), and how does a minor GC differ from a major/full GC? Java › Garbage CollectionJavaGarbage CollectionIntermediate
13What are the four types of references in java.lang.ref (strong, soft, weak, phantom), and how does each affect an object's eligibility for garbage collection? Java › Garbage CollectionJavaGarbage CollectionIntermediate
14What is the difference between LocalDate, LocalTime, LocalDateTime, and ZonedDateTime, and when would you use each? Java › Java Date & Time API (java.time)JavaJava Date & Time API (java.time)Intermediate
15How would you implement a custom ClassLoader to load classes from a non-standard source, such as loading plugin JARs dynamically at runtime, and what challenges arise with class unloading? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationAdvanced
16What is bytecode verification, and what specific categories of invalid or unsafe bytecode does the JVM's verifier reject before allowing a class to run? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationAdvanced
17How does the same class name loaded by two different ClassLoaders create two genuinely distinct types in the JVM, and what problems does this cause (such as with singletons or ClassCastException)? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationAdvanced
18How does Class Data Sharing (CDS) and Application Class Data Sharing (AppCDS) improve JVM startup time, and how does it relate to class loading and verification? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationAdvanced
19How do lambda expressions get compiled at the bytecode level using invokedynamic, and how does this differ from how an anonymous inner class implementing the same functional interface would be compiled? Java › Functional Interfaces & Method ReferencesJavaFunctional Interfaces & Method ReferencesAdvanced
20How do the different modern garbage collectors (G1, ZGC, Shenandoah) differ in their approach to minimizing GC pause times, and when would you choose one over the default? Java › Garbage CollectionJavaGarbage CollectionAdvanced
21What is escape analysis, and how does it enable the JIT compiler to perform stack allocation or scalar replacement for objects that don't actually need heap allocation, reducing GC pressure? Java › Garbage CollectionJavaGarbage CollectionAdvanced
22How does Metaspace (replacing PermGen since Java 8) store class metadata, and what specific configuration and failure modes differ from the old PermGen model? Java › Garbage CollectionJavaGarbage CollectionAdvanced