The specifications of the Java programming language are a mixture of different programming languages, although its syntax is largely based on C++.
The most significant difference from C++ is that Java has no pointers. Except for primitive data objects such as numbers, Java objects are manipulated through references. When references become null or out of scope, some objects may become unreferenced and will soon be destroyed by the automatic garbage collector thread.
The streams in Java resemble the C++ ones at first sight, but more flexibility and security are implemented. One of the striking features of the Java streams is serialization. An object which implements the Serializable interface can be transmitted via ObjectInputStream and ObjectOutputStream. Such object is serialized into a sequence of bytes to fit in the streams. Even the graph structures beginning from the object and their internal states are automatically traversed and serialized. This mechanism provides a standard method for storing and transmitting graph structures of objects via streams, which facilitates primitive persistence of objects. [Týma 96]