Introduction to Java

Introduction to Java : JAVA is a programming language which is developed by Sun Microsystems ( James Gosling and Patrick Naughton ) as a computing platform and later it is owned by Oracle corporation.
JAVA is a simple programming language as it is easy to writing, compiling and debugging the code. It reduces efforts, time and cost of programmer to develop any java based application.


Before we start learning about JAVA programming, we must be aware about below terminology:
JVM:
It stands for Java Virtual Machine.
It is an interpreter.
It is responsible to execute the program line by line. If any line has error then JVM will show an error message on console and remaining code will not get executed.
JDK:
It stands for Java Development Kit.
It is responsible to provide environment to develop and run java program to get executed.
It internally consist of JRE, no need to install JRE separately.
JRE:
It stands for
Java Runtime Environment.
It is responsible to provide runtime environment to java program to get executed.
JDK internally consist of JRE so we no need to install JRE separately if you have installed JDK already.
But if you have source code and if you want to run that code then you can install JRE separately also.

Main features of Java:
Platform independent:
Java compiler converts source code (.java file) to the byte code (.class file) and Java Virtual
machine executes that byte code. This byte code can be ran on any platform like Windows,
Linux, Mac OS because each operating system has it’s own Java Virtual machine to execute
code. This is the main reason we called Java as platform independent programming language.

Multithreading:
Java supports Multithreading that means java allows us to execute two or more java programs at a time which leads to faster execution of application.
Simple:
Java can be called as Simple programming language as it doesn’t have complexity like multiple inheritance, pointers and it’s syntax is also quite easy to understand.
Object Oriented:
Java is object oriented programming language as everything in java is an Object. Java provides us programming standards as it executes Object oriented Programming concepts like Inheritance, Polymorphism, Abstraction and Encapsulation.
Robust:
Java is robust because it uses strong memory management, it provides automatic garbage collection. Also java compiler forces us to use exception handling in case of any abnormal situation occurred in our program which may leads to termination of the program.

Hello World Program:

package com.ajitation;

public class Test {
public static void main(String[] args) {
System.out.println(“Hello World”);
} //end of main method
} //end of Test class

Output:

Hello World

Thanks for visiting Ajitation.com, Ajitation is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.