05 Aug Java Introduction
Java was developed by James Gosling and released in 1994. It easily runs on multiple platforms such as Windows, Linux, and MacOS. Initially, the releases of Java were numbered as version 1.0, 1.1., 1.2, and so on. Now, the version is represented as āJava 2ā for JDK 1.2 and above. Under Java Introduction, we will discuss the features of Java.
Java is quite popular for Write Once, Run Anywhere. Also, Java comes with a compiler and interpreter. Java came as an improvement to C++ and removed complicated features. It is said to be based on C++ and considered a āpureā object-oriented language since it only deals with Object Oriented Programming (OOP).
Features of Java
Here are the features of Java,
Architecture Neutral
Just compile your Java program and take it to another operating system. The same program works in another operating system as well without the need of recompiling it. This is why it is called āWrite Once, Run Anywhere, Anytime, Foreverā.
Security
Java programs are secure since they get compiled first into byte code, which leads to their verification.
Auto Garbage Collection
Java comes with an automatic garbage collector, which makes the memory more efficient by reclaiming memory for reuse. In C++, garbage collection isnāt automatic, so we use the delete() function. But in Java, there is no need to use any function, since garbage collector work automatically being part of JVM.
Multi-threading
Java comes with the multi-threading concept, which makes the program quite effective, unlike single-threading. You can easily execute multiple threads simultaneously with Java.
Pure Object Oriented Language
Java deals with Object Oriented Programming Language, so it has all the concepts of object-oriented such as,
- Classes: A class is a blueprint consisting of data members and member functions.
- Objects: An object is an instance of a class.
- Abstraction: Abstraction only shows the important details and hides what isnāt necessary.
- Polymorphism: Polymorphism means āpoly + morphosā i.e. many forms. It is divided into Static Binding and Dynamic Binding.
- Inheritance: Inheritance is when you create a new class from the existing class. Here, new class in the Derived Class, whereas the existing class is the Base class.
No Comments