FlashKeepers

Java · College · College and University

Java VI: JVM, Memory and Garbage Collection

JVM architecture, bytecode, class loading, heap and stack, garbage collector types, JIT compilation and common tuning flags.

About this set

39 basic cards for College Java. Set 6 of 6 in Java. It opens with "What is the Java Virtual Machine (JVM)?" and "What does the javac tool do?". Study it alongside the other College sets below.

39 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is the Java Virtual Machine (JVM)?
Show answerSoftware that executes compiled Java bytecode, providing platform independence and runtime services like memory management
What does the javac tool do?
Show answerCompiles Java source code (.java files) into platform-independent bytecode (.class files)
What is Java bytecode?
Show answerCompiled intermediate code that is platform-independent and executed by the JVM, typically stored in .class files
Why is Java bytecode platform-independent?
Show answerBytecode is the same regardless of OS or CPU, and the JVM on each platform translates it to native machine code
Name the three phases of class loading
Show answerLoading (read bytecode), linking (verify, prepare, resolve), initialization (execute static blocks)
What is the bootstrap class loader?
Show answerLoads core Java classes from the JDK (java.lang, java.util, etc) from JAVA_HOME/lib
What is the application class loader?
Show answerLoads user-defined classes and application classes from the classpath
What is bytecode verification?
Show answerDuring class linking, the bytecode verifier checks for illegal operations, type mismatches, and security violations
What is the heap in JVM memory?
Show answerShared memory region where all objects are dynamically allocated, managed by the garbage collector
What is the stack in JVM memory?
Show answerPer-thread memory region that stores method call frames containing local variables, primitive values, and object references
How is stack memory reclaimed?
Show answerAutomatically when a method returns and its frame is popped off the stack
What is StackOverflowError?
Show answerThrown when a thread exhausts its stack memory, typically from infinite recursion or very deep call stacks
What is OutOfMemoryError?
Show answerThrown when the heap is full and the garbage collector cannot free enough memory for a new object allocation
What is the young generation?
Show answerPart of the heap where newly created objects are allocated, collected frequently by minor garbage collection
What is the old generation?
Show answerPart of the heap where long-lived objects that survive young generation collections are promoted

24 more cards in the app

Study this set free