The first two of these checks take place primarily during the verification step that occurs when a class is loaded and made eligible for use.
A virtual machine architecture allows very fine-grained control over the actions that code within the machine is permitted to take.