Learn AP Comp Sci

Problem of the Day

Wednesday, September 16, 2026


Problem:

When the source code for a Java program is ready to be run

  1. the source code is run directly on the computer, just as it is
  2. the source code is compiled into machine code first, and then that code is executed
  3. the source code is run by an interpreter
  4. the source code is compiled into bytecode first, and then that bytecode is interpreted

Show solution:

The correct answer is d.

Java source code is compiled into something called bytecode, which is then interpreted by a Java Virtual Machine running on your computer.