Problem of the Day
Monday, December 22, 2025
Problem:
Java code is written in text-based source files using a text editor or an integrated development environment, and then compiled into bytecode that can be run on the computer. What instruction should be given at the command-line (in a Terminal) to run a HelloWorld.class bytecode file?
javac HelloWorld.javajavac HelloWorldjava HelloWorld.javajava HelloWorldjava HelloWorld.class
The correct answer is d. The java command invokes the Java Virtual Machine (JVM) which executes the HelloWorld.class file, although the extension shouldn't be included when issuing that command.