Safety and security are integral parts of Java’s design, with the ‘sandbox’ ensuring that an untrusted, possibly malicious, application cannot gain access to system resources. To implement this sandbox, three components are used: a class loader, a bytecode verifier, and a security manager. The safety features are provided by the Java language and the Java Virtual Machine (JVM), and enforced by the compiler and the runtime system; security is a policy that is built on top of this safety layer.