Monday, February 26, 2024

Java

 Introduction To Java Programming

Java is an object-oriented, class-based programming language. The language is designed to have as few dependencies implementations as possible. The intention of using this language is to give relief to the developers from writing codes for every platform. The term WORA, write once and run everywhere is often associated with this language. It means whenever we compile a Java code, we get the byte code (.class file), and that can be executed (without compiling it again) on different platforms provided they support Java. In the year 1995, Java language was developed. It is mainly used to develop web, desktop, and mobile devices. The Java language is known for its robustness, security, and simplicity features. That is designed to have as few implementation dependencies as possible.

History

The Java language has a very interesting history. Patrick Naughton, Mike Sheridan, and Jame Gosling, known as the Green team, started the development of Java in the year 1991. These people were the engineers at Sun Microsystems. In 1996, the first public implementation was released as Java 1.0. The compiler of Java 1.0 was rewritten by Arthur Van Hoff to comply strictly with its specification. With the introduction of Java 2, the new versions have multiple different configurations that have been built for the various platforms. It is worth noting that James Gosling is also known as the father of Java.

The ISO standard body was approached by Sun Microsystems in the year 1997 to formalize Java, but the process was withdrawn soon. At one point in time, Sun Microsystems provided most of its implementation of Java available without any cost, despite having the status of proprietary software.

Application Programs

The Implementation of an application program in Java application includes the following steps.

1.The program creation 

2.The program compilation.

3.Executing the compiled code.

It is worth noting here that JDK (Java Development Kit) should be installed properly on the system, and the path should also be set. 

The Terminologies in Java

1.JVM (Java Virtual Machine): JVM is the specification that facilitates the runtime environment in which the execution of the Java bytecode takes place. Whenever one uses the command java, an instance of the JVM is created. JVM facilitates the definition of the memory area, register set, class file format, and fatal error reporting. Note that the JVM is platform dependent.

2.Byte Code: It has already been discussed in the introductory part that the Java compiler compiles the Java code to generate the .class file or the byte code. One has to use the javac command to invoke the Java compiler.

3.Java Development Kit (JDK): It is the complete Java Development Kit that encompasses everything, including JRE(Java Runtime Environment), compiler, java docs, debuggers, etc. JDK must be installed on the computer for the creation, compilation, and execution of a Java program.

4.Java Runtime Environment (JRE): JRE is part of the JDK. If a system has only JRE installed, then the user can only run the program. In other words, only the java command works. The compilation of a Java program will not be possible (the javac command will not work).

5.Garbage Collector: Programmers are not able to delete objects in Java. In order to do so, JVM has a program known as Garbage Collector. Garbage Collectors recollect or delete unreferenced objects. Garbage Collector makes the life of a developer/ programmer easy as they do not have to worry about memory management.


No comments:

Post a Comment

Java_Features

  Features of Java The primary objective of Java programming language creation was to make it portable, simple and secure programming langua...