Java - Introduction
Java is a powerful general-purpose programming language.
It is –
- Simple- Java is quite simple and straightforward language to learn.
- High level
- Robust- Robust means reliable. It is reliable because in java, compiler will check all possible error before only. The fundamental component which make it dependable is
- Automatic garbage collection
- Exception Handling
- Memory allocation
- Type checking mechanism
- Object oriented programming-Everything in java is object. It allows users to make objects they want and create methods to handle those objects. The basic concept of Object-Oriented Programming is to create objects and re-use them throughout the program and manipulate the objects to get results.
- Platform Independent- Java has its own virtual machine i.e JVM and runtime environment i.e JRE on whichever platform it is being run on. So it doesn’t use any resource from the local machine. Therefore java is platform independent.
- Secure-It help to develop virus free application. It is mostly known for its security. It is secure because
- Java Program run inside its own Java virtual machine (JVM) and Java runtime environment (JRE).
It is used to developed:
- Desktop applications
- Web applications
- Enterprises applications
- Mobile applications
- Web servers and application servers
- And many more
Java was created in the year 1995 by Sun Microsystem. Later acquired by oracle corporation
Java Hello World Example-
// Java 1st Hello World Program
public class FirstProgram{
public static void main(String[] args) {
System.out.println("Hello World");
/* It will Print Hello World */
}
}
Hello World is a simple program in java.
To run this program on your local PC make sure you should install all the required prerequistes:
To learn to install and run this program, see next topic