Your task is to write a Java program that prints the version of the Java Virtual Machine (JVM) used to run the program. Input should be taken automatically from the system properties, and the output should be formatted as 'JVM Version: {version}', where {version} is the version of JVM running the program. Reorder the given lines of code to create a correct and functional program to complete this task.
Compile and run Java from CLI
Printing the version of the Java Virtual Machine
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
}
System.out.println("JVM Version: " + jvmVersion);
String jvmVersion = System.getProperty("java.vm.version");
public class Main {
public static void main(String[] args) {
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.