Table of Contents
1. Overview of Java:
Java is the most popular programming language And millions of devices run on Java. Before we talk about the important topics of Java, let's have a quick look at an overview of Java. So Java was invented by James Gosling in 1995 under sun microsystems. Java was made on the principles of write once and run anywhere and was created on the principle like a robust portable, platform-independent, high performance, multithreaded, Etc.
At the time of the invention of java, there was a coffee near James Gosling's office that was Javanese coffee That gained Global popularity in the 19th and early 20th. So James Gosling named his invention in the name of “Java”. That's why we can see a cup of coffee as a logo of the Java programming language.
Java is :
- Object-oriented: In Java, everything is treated as an object. Here objects talk to each other to perform a specific task Defined by the user.
- Platform independent: Other programming languages are not platform-independent. When we compile a Java Program, a bytecode is generated and that bytecode can be Run on any machine that makes Java Work as a platform-independent programming language.
- Simple: Learning and understanding the Java program are very simple, easily human-readable, and easy to understand the important OOP’s concept of Java.
- Secure: security features of Java enable to development of virus-free and Secure applications.
- Portable: Once we compile a Java code we can transport that byte code can be run on any machine.
- Robust: Java provides features to eliminate error code by providing compile-time checking and runtime checking.
- Multithreaded: Java multithreaded feature provides the capability to perform various tasks simultaneously at the same time you can play with other programs. various talk or programs can talk to each other at the same time.
- High performance: Java provides git that is just in time compiler that enables high performance.
1.1 History of Java:
In 1991 James Gosling was working on his set-top box project for a project he needed a language that can work smoothly with this project so so he initiated the Java language project at that time only. An interesting fact is that this language was first named as the “Oak” tree that stood outside gosling’s office. Later it was named Green and finally, it got its name “Java”.
In 1995 as we know Java 1.0 was released by sun microsystems and on November 13, 2006, most of the Java features were made open-source software by Sun microsystems under the general public license that is GPL. And on May 8, 2007, they finished the process by making all of Java’s codes free and open source. They didn't release one portion of the code that was not under the copyright of sun microsystems.
Refer to this link for more detail on the history of the java programming language.
1.2 The setup process:
To write programs in Java with we need to set up our system. Like the Java Runtime(JRE), Java Virtual Machine(JVM), the editor needs to be set up in our computer or local system. we will do this process step by step. The first step is to download Java from the official website of java.
Now we need to install this in our system.
- Now right-click on our computer or My Computer and select Properties.
- Now after clicking on the Advanced system setting it will open System Properties options. From here we have to click the Environment Variables button under the Advanced tab.
- After we open the Environment Variables dialog box, in the System variables section there should be one variable called “Path” and we need to add the C:\Program Files\Java\jre1.8.0_301\bin along with the existing values.
- Now we can check if the java path is set correctly or not by running cmd and executing the java -version command.
By performing the above-mentioned steps successfully we are done with the system setting.
Now we need to download the eclipse editor from here. Now we can write awesome codes and execute them in our system.