There is no explicit deallocation. The basic typing rule is that it is valid to assign an expression of type C to a variable of type D if and only if C inherits from D . Any reference variable can take on the special value null . Attempts to dereference a null value are also checked at runtime. If a runtime check fails, an exception is raised.
Arrays can contain either primitive or reference types.
All references to arrays are subject to runtime bounds checking . There is no way to point directly into an array. There is also a class of mutable StringBuffer s. Strings are encoded in Unicode. But it provides a restricted goto by allowing labels on loops, which can be referenced by break or continue statements. Exception handlers can be restricted to handle only certain subclasses of exceptions.