What Is Java? A Beginner’s Guide to Java and Its Evolution
Recommended by 142 users
This is my first blog of Java tutorial series on “ What is Java ”. I hope you will enjoy reading it.
From laptops to data centers, gaming consoles to scientific supercomputers, cell phones to Internet, Java is everywhere! As a measure of popularity, Oracle quoted the statistics telling there are nine million Java developers in the world. This directly tells you the demand of Java and its evolution in software development in future.
In this blog, I will take you through the following topics, which will be the base of the upcoming blogs:
- Why learn Java?
- What is Java?
- Features of Java
- Components in Java – JDK, JVM, JRE
- How Java is Installed?
Why learn Java?
Before I answer the question, what is Java, let me brief you about why you should choose Java.
Let’s have a look at the data trends in the image given below which shows how Java has dominated this field from early 2000’s till the present 2017.
As you can see from the above statistics, Java is highly popular and widely used in the industry.
Apart from this, Java has been used in different domains. Some of them are listed below:
- Banking: To deal with transaction management.
- Retail: Billing applications that you see in a store/restaurant are completely written in Java.
- Information Technology: Java is designed to solve implementation dependencies.
- Android: Applications are either written in Java or uses Java API.
- Financial services: It is used in server side applications.
- Stock market: To write algorithms as to which company they should invest in.
- Big Data: Hadoop MapReduce framework is written using Java.
- Scientific and Research Community: To deal with huge amount of data.
Wait! Java can do more.
Let’s see how some of the technologies make use of Java as an essential core of their functionalities.
You can see in the above image, Java is an ocean of opportunities.
Java is most widely used programming language. It is present everywhere. It really doesn’t matter in which domain you work in, you will surely come across Java sooner or later!
Let us see now what is Java?
What is Java?
Java is a programming language developed by James Gosling in 1995 for Sun Microsystems.
It is an object-oriented language similar to C++, but with advanced and simplified features. Java is free to access and can run on all platforms.
Java is concurrent where you can execute many statements instead of sequentially executing it. Also, it is class-based and an object-oriented programming language. In addition to these features, Java is also an independent programming language that follows the logic of “Write once, Run anywhere”. This means that the compiled code can run on all platforms which supports java.
In simple words, it is a computing platform where you can develop applications.
I would suggest you to go through this Java tutorial video that explains “what is Java”. Go ahead, enjoy the video and tell me what you think.
Java Tutorial For Beginners | What is Java | Edureka
Features of Java
Some of the key features of Java are:
Java is designed to be easy to learn. If you are a fresher or a professional programmer, believe me it’s very simple to master Java. Java has made life easier by removing all the complexities such as pointers, operator overloading as you see in C++ or any other programming language.
Java is platform independent which means that any application written on one platform can be easily ported to another platform. This is a key feature of java as it can run on all the operating systems without any dependencies.
Java is an object oriented programming language. In java, everything is considered to be an “object” and all the operations are performed using these objects. These objects possess some state and behavior. Therefore, it is the most used language as it supports OOP’s concepts.
Java is a secured language because all the code is converted in byte code after compilation, which is not readable by human. Also, java does not use explicit pointer and run the programs inside the sandbox to prevent any activities from untrusted sources. It enables to develop virus-free, tamper-free systems/applications.
Java is dynamic in nature as it has the ability to adapt to an evolving environment. Java programs carry a substantial amount of run-time information which is used to verify and resolve access to objects. It also supports dynamic memory allocation due to which memory wastage is reduced and performance of the application is increased.
Java provides a feature which helps to create distributed applications. Using Remote Method Invocation (RMI), a program can invoke a method of another program across a network and get the output. You can access files by calling the methods from any machine on the internet.
Java has a strong memory management system. It helps in eliminating error as it checks the code during compile and run time. Java completely takes care of memory allocation and releasing, which makes the Java program more robust.
Java achieves high performance through the use of bytecode which can be easily translated into native machine code. With the use of JIT (Just-In-Time) compilers, Java enables high performance.
Components in Java
JVM (Java Virtual Machine)
It is an abstract machine. It is a specification that provides run-time environment in which java bytecode can be executed. It follows three notations:
- Specification: It is a document that describes the implementation of the Java virtual machine. It is provided by Sun and other companies.
- Implementation: It is a program that meets the requirements of JVM specification.
- Runtime Instance: An instance of JVM is created whenever you write a java command on the command prompt and run the class.
JRE (Java Runtime Environment)
JRE refers to a runtime environment in which java bytecode can be executed. It implements the JVM (Java Virtual Machine) and provides all the class libraries and other support files that JVM uses at runtime. So JRE is a software package that contains what is required to run a Java program. Basically, it’s an implementation of the JVM which physically exists.
JDK(Java Development Kit)
It is the tool necessary to compile, document and package Java programs. The JDK completely includes JRE which contains tools for Java programmers. The Java Development Kit is provided free of charge. Along with JRE, it includes an interpreter/loader, a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development. In short, it contains JRE + development tools.
Refer to this below image and understand how exactly these components reside:
How Java is Installed?
Let me guide you through the process of installing Java on your system. Just follow the below steps:
Step 1: Go to the link: http://www.oracle.com/technetwork/java/javase/downloads
Step 2: Download Java Platform (JDK) version 8 update 121(latest) and install on your system.
Refer to the below screenshot to get a better understanding.
Now, most of us face issues while setting a permanent path for the JDK. So let me make your task easy, just go through these simple steps and you will be done with it!
Step 1: Right click on ‘My Computer’ and go to Properties.
Step 2: Click on Advanced system setting.
Step 3: Click on Environment Variables option.
Step 4: Select Path variable to edit.
Step 5: Enter the path to the bin folder inside the JDK installed on your system. (The default path is C:\Program Files\Java\jdk1.8.0_121\bin)
By following the above steps, you are done with the Java installation part. Now to check your JDK is correctly set, you can verify it by going through the below steps:
- Go to your command prompt.
- Write javac and press enter.
Look at the below screenshot to get an idea of what the command prompt displays.
In case you are getting this output. Your java path has been correctly set!
Now you are ready to code! But you must be wondering where should I get started for the same. You need an IDE (Integrated Development Environment) where you can develop and compile your code. There are many IDEs present in the market such as Netbeans, IntelliJ, Eclipse etc., but Eclipse IDE is most widely used among all. To download Eclipse IDE, follow the below steps:
- Go to www.eclipse.org
- Download Eclipse Neon installer on your system (Windows/Linux/Mac), I am installing on Windows.
Refer to the below screenshot to get a better understanding.
After installing everything, you are all set to code!
I hope you enjoyed reading my blog and got the answer to what is Java. Do read my next blog on Java Tutorial where I will be explaining in detail on below topics with examples.
- Data Types and Operations in Java
- Control Statements
- Classes & Objects
- Basic OOPS Concept
Now that you have understood basics of Java, check out the Java training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. Edureka’s Java J2EE and SOA training and certification course is designed for students and professionals who want to be a Java Developer. The course is designed to give you a head start into Java programming and train you for both core and advanced Java concepts along with various Java frameworks like Hibernate & Spring.
Got a question for us? Please mention it in the comments section of this “What is Java” blog and we will get back to you as soon as possible.