🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.-Xss
  2. B.-Xms
  3. C.-XX:+UseG1GC
  4. 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 →