In this tutorial, you’ll learn what is Java, history of Java and the uses of Java with a hello world program.
What is Java?
Java is a widely-used programming language in the computer world. Java is a class-based object-oriented programming language. Java is a platform-independent language as it has a Java runtime environment, thus eliminating the need for recompilation.
Java is a Simple, Robust, Portable, Platform-independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-Oriented, Interpreted, and Dynamic programming language.
Some basic concepts of Java are:
- Java uses a JVM, Java Virtual Machine, which is the crucial reason for platform independence.
- Java’s syntax is very much similar to C programming.
- Storage management is easier.
- These make Java an efficient programming language for application development.
History of Java
Java was first developed in the year 1995 by James Gosling at Sun Microsystems as a core component of Sun Microsystems’ Java platform (Java 1.0). Java was originally designed for interactive television. As it was too advanced at that time, Java shifted its way into the programming world.
It was previously named Green talk and Oak and was later changed into Java for its uniqueness. In 2007, Sun Microsystems relicensed most of its Java technologies under the GNU proprietary license. In 2010, Oracle acquired Sun Microsystems, from then oracle issued two types of services, one- an open-source free JDK for developers and a commercial license for large-scale productions.
Uses of Java
Java can be used to build the following applications
- Mobile Applications
- Desktop GUI Applications
- Web-based Applications
- Enterprise Applications
- Scientific Applications
- Gaming Applications
- Big Data technologies
- Business Applications
- Distributed Applications
- Cloud-based Applications
Java is everywhere. Any large application has its credit to Java.
Hello world program using Java
In this program, you will learn about writing a simple program in Java.
Desired Output:
Hello, World!.
Program
public class Main { public static void main(String[] args) { System.out.println("hello, world"); } }
Output
Hello, World!
Note: The name of the class and the file name should be the same. If the class name is ‘HelloWorld’ save the file as ‘Helloworld.java’.