Interfaces model these relationships quite well, and classes implement the leaves. Java also has exceptions and is multi-threaded. One feature of Java is that every variable is encapsulated within either an object or a function, and every function is encapsulated within a class. There are no globals of any kind. All programming is object- oriented.
Polymorphism is automatic and ubiquitous.
Since Java uses a garbage collector, there are no destructors as such, though it does provide a finalization mechanism that the programmer can guarantee will be executed before an object is actually deleted. This is seldom needed, except when an object holds a reference to an external entity such as a file that must be closed. It borrows a strong typing model from Modula-3, and a distributed idea of what constitutes an application from Oberon. Java is free and distributed via the internet. It is supported by a data structures library and a GUI library.