Java Examplet is a central place for storing everything related to the programming language of Java(TM). You can find a lot of examples codes, tutorials, links, etc in this website.
Java(TM) is a trademark owned by Sun Miicrosystem. Java can be regarded as an inheritance of C and C++ programming languages which have been launched to the world in 1994 by Sun Microsystem Inc. It has been gain a lot of popularity in nowadays.
Java(TM) is an full-power Object Oriented Programming language which inherited a lot of coding style from C programming languages. The followings are the characteristic of Java Programming language:
- strongly data typed
- object oriented
- C styled
- architecture neutral
- high performance
- run by bytecode
As Java(TM) was regarded as a successor of the programming languages of C and C++. Java(TM) is designed to be an Object Oriented programming language similar to C++ and source codes written in Java are constructed by blocks with the style used in C programming language. During the developing processes of Java(TM), we can observe the awareness of Java's Designers in following problems with respect to C and C++:
- The problem of handling unused objects in C++ which always caused the memory consumption error.
- Programming pointers in C is complicated and always generate logical error and is vulnerable to heap overflow attack.
- Porting code written in C or C++ to different platform always requires some adaptation works.
- C or C++ programs with careless designs always prone to buffer overflow vulnerability. See the Discussions on buffer overflow in Java Programming Language.
Java(TM) is designed to avoid those problems
14 years after the invention of C programming language, Java(TM) came to the world trying to fix the problems mentioned above. Java programmers don't need to monitor how the objects are destroyed and the memory consumption is monitored once a Java program is executed.
This is done by a Daemon thread which is run under Java Virtual Machine monitoring the conditions of all objects from time to time. Once an object is not long accessible or other object, Java Virtual Machine will terminate and release the memory of the objects.
Java programmers are not allowed to use pointer to manipulate objects, and there are always boundary checking on Array operations to prevent buffer overflow and heap overflow. Programmers are not required to care about the risk of buffer overflow or heap overflow. Once the code has been compiled successfully, the binary code is guaranteed.
Java programmers do not have to concern to the differences between different hardware, it was because all the byte code are run under the same Java Virtual Machine.
- Java(TM) is a trademark owned by Sun Miicrosystem.
- All trademarks are property of their respective trademark owners.