Why is Java compiled to bytecode?
- Bytecode runs on the Java virtual machine.
- Any device with a JVM can run it.
- So programs are portable.
Answer Bytecode is portable across any device with a JVM
A-level Computer Science revision · Processors, software and development
A virtual machine is software that emulates a computer, allowing one OS to run inside another or code to run on any hardware with the VM. Interpreters for intermediate code (such as Java bytecode) are process virtual machines. Caching stores frequently or recently used data in faster storage to speed up access.
Watch out Code running on a virtual machine is usually slower than native code.
Why is Java compiled to bytecode?
Answer Bytecode is portable across any device with a JVM
What is a disadvantage of running software on a virtual machine?
What is a web browser cache used for?
Give one use of a system virtual machine.
Answer Testing software on different operating systems on one physical computer, safely isolated from the host.
A-level Computer Science Pro, OCR H446
£119 once
Price rises to £199 on 1 January. Save £80 by joining before then.
At least 12 months of access
No VAT is charged.