Java Programming Introduction
By AmarSivas | | Updated : 2021-02-08 | Viewed : 1021 times
Table of Contents:
A Brief History of Java
Java has initially started a research project for network devices. Sun Microsystems mainly design Java for various network devices. However, it was changed and named OAK and then Green Project. Sun Microsystems team finally renamed Java. Sun Microsystems team published the first version of Java 1.0 in 1991. When the time Java introduction the other options were C/C++ for application implementation. However, C/C++ has some drawbacks. So that is Sun Microsystems focused on some other language with some set of rules. So, with this set of rules, the developer will feel the programming is easy.
Java Programming Language Principles:
Simple and Object-Oriented: Programming is easy to learn and implement When a programming language is object-oriented.
Compiled and Interpretable:Java is an independent language for all Operating Systems. The compiler will convert the .java file into a .class file, which is nothing but bytecode. The file .class is portable for all Operating Systems. The bytecode is not readable for Microprocessors. So JVM will interpret it as binary code, which is readable for microprocessors.
Robustness: Robustness means an efficient way for the usage of memory. Java has a better mechanism for efficiently handling Memory management. So Programming is not required for memory allocation and deallocation as in C++.
Architectural Neutral: Java program will get executed irrespective of the microprocessor architecture.
Portability: Portability will allow the Program execution in different types of Operating Systems without modification. Means Write Program once and execute in other Operation Systems without modification.
High performance and Multithreaded: As a Program application can handle the data with multithreading in a better way, it will compute and provide results in less time.
Secure: Java programming language is providing excellent security features. So, the application will be very safe.
Dynamic: The application is highly portable for all Operating Systems. So, the applications can be downloaded anywhere in the network into the system for application execution.
Java Language Terminology
Before we start programming in Java, we need to know some standard terms for better understanding Java.
JDK: Sun Microsystems introduced the JDK (Java Development Kit) as the primary development environment, sufficient for development. It contains all other tools for development, i.e., development Tools and JRE. These tools will be helpful for development. Although java language is OS platform-independent, JDK is OS platform dependent. Java compiler will compile java file and create bytecode converted file, i.e., .class file. This bytecode conversation file is not readable for the Microprocessor. So, JVM will create a low-level conversation called binary code. So, this binary code should be platform-dependent as it should be readable by Microprocessor. That is why JDK means JRE and JVM are platform dependent. Due to this reason, The JDK design is OS platform dependent. JDK is for those who want to implement java programs.
JRE: It is a sub-component of the JDK. Technically, developers consider JRE as Runtime Environment, Where it is used for only execution, not for development. Technically, We can say JRE is for running the java programs. It contains ClassLoader, JVM, and some class libraries. JRE is for end-users who want to use Java applications.
Java Compiler:The compiler will compile the Java file and generate the bytecode file, which is nothing but a .class file. As we know, the language code should be a machine-readable format that is binary code. The compiled code which resulted as in bytecode is not a machine-readable format. So, the bytes code should be converted into a machine-readable format.
JVM: In other programming languages, the compiler will generate the machine-readable format code. However, Java Compiler will generate the bytecode, which is not machine-readable. However, this is portable for types of Operating Systems. So, a Microprocessor needs byte code as readable. JVM stands for Java Virtual Machine. So, JVM will tackle this problem where the byte code will be made machine-readable. JVM will convert the byte code into a Machine-readable format that is binary code.
ClassLoader: ClassLoader is a subpart of JVM which will handle the class loading mechanism. The ClassLoader can quickly identify a .class file that contains the Java bytecode format.