← Quiz: JVM Memory and Garbage Collection: all 10 questions
Quiz: JVM Memory and Garbage Collection · Question 10 of 10
Which JVM option sets the maximum heap size?
Which JVM option sets the maximum heap size?
- A.-Xss
- B.-Xms
- C.-XX:+UseG1GC
- D.-Xmx
Answer & explanation
Correct answer: -Xmx
-Xmx sets the maximum heap, -Xms the starting heap, and -Xss the stack size of each thread.
Can you get the rest right without peeking?
Take the timed Quiz: JVM Memory and Garbage Collection quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →