13 Aug 2019

What is Java? | What is Java used for? | Java Programming

What is Java
What is Java
This is not a tutorial, as mentioned in the title. In this post, I will try to tell you what is java exactly.

What is Java

Java is an object-oriented, concurrent, class-based, general-purpose, high-level,  secured programming language and itself a platform (platform-independent) which is used to develop computer and mobile applications.
The first and only reason for designing Java is to have fewer implementation dependencies.
Java is also called a WORA language. Its an abbreviation of Write Once Run Anywhere. It means that the code you will write in Java, After compiling it, it will create a class file that class file will be the bytecode which can be executed in any device which supports Java Virtual Machine.
How it is platform-independent will be explained later in this article.
Java was created by James Gosling and with his team inside Sun Microsystems in 1995 and later in 2009 owned by Oracle. It is the most used programming language nowadays. Java was called OAK before, later its name changed to Java. Firstly it was created for set-top boxes, it was not much successful in that aim. Then Java got many updates to make it stable for the World Wide Web, then it becomes much popular. According to Oracle, over 3 billion devices use Java.
The basic programming concept in Java is driven from C and C++. But Java also has some low-level language features which C and C++ don't have.
Oracle is the only owner now of official implementations of the Java SE platform, and Oracle implementations are also available for Microsoft, Unix, and Solaris and Linx.
The implementation of Oracle is prepackaged into 2 completely different distributions:

  1. Java Runtime Environment (JRE): that contains the components of the Java SE platform needed to run Java programs and is meant for the end-users.
  2. Java Development Kit (JDK): that is meant for package developers and includes development tools like the Java compiler, Javadoc, Jar, and a program.

You can create any type of apps using Java almost. It covers a wide area of development.
It is used to create:-

  1. Web applications
  2. Mobile applications (especially Android apps)
  3. Games
  4. Application servers and web servers
  5. Database connection
  6. It is also used to build IoT devices.
  7. And much more.

Robust Garbage Collection

Java is also called a robust language because it does somethings by itself. it works with the heap memory and finds, identify and destroy the unreachable objects in the object cycle. Here the developer doesn't need to do anything all the garbage collection process gets done in Java Virtual Machine, this is why Robust Garbage Collection is the most recognized feature of Java. 
What is Java will be an incomplete post if we will not talk about its popularity?

A very Basic Java Program

public class HelloWorldApplication {
    public static void main(String[] args) {
        System.out.println("Hello World!");     // Prints Hello World! to the console.
    }
}

This is not for understanding, You will learn and understand it in later tutorials. As this is an article "What is Java?" Just see the code, how it looks and try to observe.
We save Java file with the extension .java and after compilation of that file, another file we get that is a class file and its extension is .class

Why Java is so popular?

The first thing behind Java's popularity is that the whole world uses smartphones, and android phone users are more than iPhone users, even Playstore has more apps than Appstore. And android apps are developed using Java. Java is popular also because it is platform-independent as told above. So how it is platform-independent while each and every software needs an operating system, platform or environment to hold control and run the software. Because, Java is itself a platform, or we can say it has its own platform to run its apps. So no matter which is an outer operating system or device. It never checks for that. It just installs its own platform to run its apps, that is also called Java Virtual Machine (JVM).
In other words, we can surely say that the Java code you wrote and compiled in Windows can be executed in Unix also.
The compiled code in Java is called bytecode or portable code which can be executed in every device which supports Java Virtual Machine (JVM).
Most of operating systems really welcome (supports) Java apps including Windows, Linux, and Mac OS.
I always try to focus on the title of the post, I always try to focus on the reason for the post. That is why I only write about the titled topic, not the left and right things. So please try to understand this post was only about java as mentioned in the title "What is Java".
So the title of this article was What is Java. I hope you guys know now that what is Java. You can use below links to know more about the terms related to Java.

You can use the below link to download the latest version of Java.
Download Java

Posted in  on August 13, 2019 by team |