Untusted code : Code of unknown origin that can potentially cause some harm when executed. Untrusted code may not always be malicious but this is usually hard to determine automatically. Consequently, untrusted code should be run in a sandboxed environment.
Trusted Code : Code that is loaded by the primordial class loader, irrespective of whether it constitutes the Java API or not.