James Gosling from Sun Microsystems was the creator of the programming language Java who developed it in 1991.The main utility of Java is that a program is written once and it can be run on multiple OS.
The 1st version of Java that was publicly available was Java 1.0 that came out in the year 1995. Oracle Corporation acquired Sun Microsystems in 2010 and got hold of Java on its own. Sun Microsystems had made Java available under the GNU GPL (General Public Licence) in 2006 and Oracle has continued this project under the name OpenJDK.
Downloading Java software gets you the program in the form of JRE (Java Runtime Environment). It consists of the Java platform core classes, JVM (Java Virtual Machine) and supporting libraries. The runtime portion of the Java software is JRE that is required to run the software in the web browsers. Java consists of a programming language, core libraries, a compiler and a JVM (runtime). The runtime provides the flexibility to write the codes in any programming language other than Java that can still run on the JVM.
These are the properties of Java programming language:
• Bytecode makes Java more secure
Whenever a programmer compiles a program, a class file with Bytecode is created by Java. The class files are tested by the JVM before execution for malware and viruses.
• Exception handling concept
Exception handling in Java helps the programmers to get away with the risk of crashing the system.
• Type-safe reference casting in JVM
Java Virtual Machine monitors you whenever you use an object reference. The cast is deemed invalid if the programmer tries to cast a reference to a different type.
• Security Model
The security model of Java intends to protect and help the programmers from intimidating programs downloaded from untrusted sources on the internet or within a network through its ‘Sandbox’ that allows all programs to run inside itself, preventing any reading or writing action on the local disks.
• Access Control functionality
Java has access control functionality that comes in quite handy in preventing access to critical objects from untrusted codes.
• No use of pointers
Use of pointers may cause unauthorized access to memory blocks when the other programs get the values of the pointers; while c and c++ use pointers, java doesn’t. The reason behind this is that Java has its own internal mechanism for management of memory and it gives access to the program data only if it has an appropriately verified authorization.
• Tested code re-usability
While developing Java Enterprise applications, the coders can re-use the code that has already been tested. ‘Programming by Contract’ concept is a great feature of Java.
• Garbage collection mechanism
It is yet another addition to the security features of Java. Garbage collection mechanism aids the developers to ensure the integrity of their programs at the time of executions, so as to avoid any JVM crashes because of incorrect memory freeing. In this process, Java automatically manages the storage allocation and cuts the need for manual action.
• Execution in a defined order
In Java, all the operations are defined in a specific order of execution while all the primitives are defined with a predefined size.
• Protection from security attacks
Any method or class declared as FINAL cannot be overridden. So, if the developers declare the method or class as final, it protects the code from security attacks that may include various override methods, creating a sub-class and replacing it with the original class.