Java is a high-level object oriented programming language.
Java is a very simple compared to earlier programming languages.
Java has following features
4) High Performance
7) Architecture neutral
10) Object Oriented
Java is simple because it has no pointers, structures, unions, operator overloading and virtual base classes as in C++.
It does not require header files at the starting of source code.
Java can deal effectively with errors during execution & with erroneous input.
It need not have to worry about problems like bad pointers, memory allocation problems and memory leakages problems because Java uses Garbage collection for memory deallocation.
It has strong type checking mechanism.
Exception handling mechanism, help programmers to get rid of system crashing problems.
These all features help to make Java Robust.
The main reason for making Java more secure and portable is BYTECODE, which is the set of instructions used by Java Virtual Machine (JVM).
Thus, Java prevents generating changes in a program outside the authorized system.
If changes are made in BYTECODE by unauthorized user and system, JVM discards the file.
Java does not make use of pointers which prevents unauthorized access to memory.
Therefore, Java is one of the most secured high-level programming languages.
4) High Performance
Just In Time (JIT) compiler is mainly used for achieving high performance of Java programs while running.
Initially, Java was using a straight forward approach in JVM for converting BYTECODE into machine language and then running it on a computer.
JVM used to convert line by line BYTECODE into machine language and run it.
Even if the same BYTECODE is present at different lines, JVM used to convert these BYTECODE lines into machine language every time they appear. That is JVM was doing same work, again and again, resulting in the wastage of time.
After introducing JIT compiler in Java, JVM checks the code initially to find out whether same BYTECODE appears repeatedly. If yes, JVM converts that BYTECODE into machine language only once and use the same converted machine code where ever the same BYTECODE appears.
This approach helps Java in saving time by doing the same type of work only once and using its result where ever it needs.
Distributed applications are those applications that are divided into different parts for different systems. But act as a single application running on a single system.
It is like a football team where all players are scattered throughout the field but work as a single team.
Java is mainly used to create distributed applications.
Java uses TCP/IP and UDP/IP protocol with socket programming for distributed communication.
These protocols are very useful in making the connection between those distributed parts of the application and try to interact with each other to work as a single application.
Java also uses RMI (Remote Method Invocation) & helps to make Java application distributed across a network.
1) Internet-based remote access and support applications.
2) Banking Application, etc.
BYTECODE is the main reason for making Java language, portable.
It allows Java programs to run in a wide variety of environments like Windows, Linux, Mac, etc.
JVM acts as an interpreter for BYTECODE.
JVM is developed separately for every distinct environment.
Suitable JVM needs to be installed on every different environment/operating system.
Therefore, by creating .class file (containing BYTECODE) of Java program in one environment can be run on different environments.
7) Architectural neutral
The main aim of Java is Write Once; Run Anywhere (WORA).
Therefore it is made platform independent & does not rely on the Operating system & its underlying processor.
Thread is a part of the program that can run separately without depending on other parts of the program.
The program which contains two or more threads (parts of the program), that can run separately and simultaneously without depending on each other is called multithreaded program.
Java supports Multi-threading, that is one program, multiple tasks at a time.
Multithreading increases the speed of program execution.
Java loads the byte code dynamically at runtime and executes that code.
Java programs carry large amounts of Run-time type information that is used to verify and resolve accesses to objects at Run-time.
This feature makes Java possible to dynamically link code in a safe, practical and beneficial manner.
10) Object Oriented
Java is a programming language mainly based on Objects rather than primitive data types.
Java is one of the easiest object oriented programming language.
These days Object oriented programming has become the most preferred programming approach by software industries.