Java was developed by Sun Microsystems Inc in 1991 and latterly acquired by Oracle Corporation & designed by James Gosling and Patrick Naughton. It’s a simple programming language. Writing, collecting, and remedying a program. Therefore, it helps to produce modular programs and reusable code.
Before we start learning this language, let’s get familiar with common language terms.
Java Virtual Machine (JVM)
Generally, refer to as JVM. Before, we discuss JVM let’s see the phases of program execution. Phases are as follows we write the program, also we collect the program and at last, we run the program.
- Writing of the program is of course done by java programmers like you and me.
- Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). It takes this program as input and generates bytecode as output.
- In the third phase, JVM executes the bytecode generated by the compiler.
So, now that we understood that the primary function of JVM is to execute the bytecode produced by the compiler. Each operating system has a different JVM, still, the output they produce after the execution of bytecode is identical across all operating systems. That’s why we call this language a platform-independent language.
The javac compiler of JDK compiles the java source code into bytecode. Although, the bytecode is saved in a class train by the compiler.
Java Development Kit (JDK)
While explaining JVM and bytecode, I used the term JDK. Let’s discuss it. As the name suggests this is a complete java development kit that includes JRE (Java Runtime Environment), compilers, and various tools like JavaDoc, Java debugger, etc.
In order to produce, collect and run this program you would need JDK installed on your computer.
Java Runtime Environment (JRE)
JRE is a part of JDK which means that JDK includes JRE. When you have JRE installed on your system, you can run this program however you won’t be suitable to collect it. JRE includes JVM, browser plugins, and applets support. When you only need to run this program on your computer, you would only need JRE.
Main Features Of Java Language
The compiler (javac) converts the source code (java train) to the byte law (class train). As mentioned over, JVM executes the bytecode produced by the compiler. This byte code can run on any platform similar to Windows, Linux, Mac OS, etc. Each operating system has a different JVM, still, the output they produce after the prosecution of bytecode is identical across all operating systems. That’s why we call this program a platform-independent language.
Object-oriented programming is a way of organizing programs as a collection of objects, each of which represents a case of a class.
4 main concepts of Object Oriented programming are
It is a simple language because it doesn’t have complex features like Operator overfilling, Multiple heritage, pointers, and Explicit memory allocation.
Robust means are reliable. This programming language puts a lot of emphasis on early checking for possible errors, that’s why the java compiler is suitable for descry crimes that aren’t easy to descry in other programming languages. The main features of this language that make it robust are scrap collection, Exception Handling, and memory allocation.
We don’t have pointers and can not pierce out of bound arrays (you get ArrayIndexOutOfBoundsException if you try to do so) in this language. That’s why several security excrescencies like mound corruption or buffer overflow are insolvable to exploit in this language.
Using this programming language we can produce distributed operations. Remote Method Invocation (RMI) and Enterprise Java sap are used for creating distributed operations. These language programs distribute further than one system that is connected to each other using an internet connection. Objects on one Java Virtual Machine (JVM) can execute procedures on a remote JVM.
This language supports multithreading, while multithreading is a Java point that allows concurrent prosecution of two or further corridors of a program for maximum utilization of CPU.