Fiendish Java Quiz

An illustration of a person puzzling over computer code, with Java-related symbols and flags in the background.

Fiendish Java Quiz

Test your knowledge of Java Virtual Machine arguments and performance tuning with our Fiendish Java Quiz! This quiz is designed for Java developers looking to deepen their understanding of JVM options and configurations.

You'll explore:

  • VM arguments
  • JVM heap size settings
  • Performance tuning flags
  • Garbage collection options
13 Questions3 MinutesCreated by DebuggingGuru347
Which of these is a valid Java VM argument?
-XX:+UseParallelOldGC
-XX:+UseParallelGC
-XX:+UseParallelNewGC
This options should be specified when a large JVM heap is required (greater than 4 Gytes) and the architecture is 64-bit.
-XX64
-XX:+h64
-d64
What does this flag do: -XX:+HeapDumpOnOutOfMemoryError
Used to issue emergency commands to be executed in case of out of memory error
Instructs the JVM to dump heap into physical file in case of OutOfMemoryError
Set policy that limits the proportion of the VM's time that is spent in GC before an OutOfMemory error is thrown
Is this program tuned for Higher Throughput or Lower Response time: java -server -XX:+UseParallelGC -XX:+UseLargePages -Xmn10g -Xms26g -Xmx26g
Higher Throughput
Lower Response Time
What does this do: -XX:NewSize=512M
Resets JVM heap size on completion of initial pass
Sets the CMS garbage collector
Sets size of JVM Young generation
Which of these is NOT a valid Java VM argument?
-XX:BleedMemOnMax=false
-XX:MaxGCPauseMillis=500
-XX:+AlwaysPreTouch
-XX:MaxMetaspaceSize sets the maximum amount of native memory that can be allocated for the class metadata. But what is its default?
Same as -Xms
Unlimited
Platform dependent
How do I set the maximum heap size to 16kb?
-Xmx16
-Xmx16k
-XX:+mx16
Which version of Java introduced -XX:-OmitStackTraceInFastThrow
8
7
6
5
What does this do? java -XX:DumpLoadedClassList=hello.classlist Hello
Recompiles only classes referenced by the Hello application
Create a list of all classes used by the Hello application
Runs the Hello application but with classpath specified by hello.classlist
Which java CLI command could you use to dissassemble a class file?
Javap
Jmod
Jdeprscan
What does the jps command do?
List the instrumented JVMs on the target system
Start a graphical console to monitor and manage Java applications
Monitor the creation and termination of instrumented Java HotSpot VMs
The -server flag selects server application runtime optimizations. But what does this do?
Prevents external applications from forcing expensive garbage collections.
The directory server will be more aggressively optimized to produce higher throughput.
Selects a low initial JVM heap size for an application.
{"name":"Fiendish Java Quiz", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Java Virtual Machine arguments and performance tuning with our Fiendish Java Quiz! This quiz is designed for Java developers looking to deepen their understanding of JVM options and configurations.You'll explore:VM argumentsJVM heap size settingsPerformance tuning flagsGarbage collection options","img":"https:/images/course1.png"}
Powered by: Quiz Maker