What is Java?


Java is a popular programming language, created in 1995.
It is owned by Oracle, and more than 3 billion devices run Java. 




Why Use Java?
  • Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
  • It is one of the most popular programming language in the world
  • It is easy to learn and simple to use
  • It is open-source and free
  • It is secure, fast and powerful
  • It has a huge community support (tens of millions of developers)
  • Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
  • As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa.

Application

According to Sun, 3 billion devices run Java. There are many devices where Java is currently used. Some of them are as follows:
  1. Desktop Applications such as acrobat reader, media player, antivirus, etc.
  2. Web Applications such as irctc.co.in etc.
  3. Enterprise Applications such as banking applications.
  4. Mobile
  5. Embedded System
  6. Smart Card
  7. Robotics
  8. Games, etc.

Types of Java Applications

There are mainly 4 types of applications that can be created using Java programming:


1) Standalone Application
Standalone applications are also known as desktop applications or window-based applications. These are traditional software that we need to install on every machine. Examples of standalone application are Media player, antivirus, etc. AWT and Swing are used in Java for creating standalone applications.

2) Web Application
An application that runs on the server side and creates a dynamic page is called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. Technologies are used for creating web applications in Java.

3) Enterprise Application
An application that is distributed in nature, such as banking applications, etc. is called an enterprise application. It has advantages like high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.

4) Mobile Application
An application which is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications.


Java Example

Let's have quick look at our first Java Program. A detailed explanation of program is available in next page.

class A1 {
public static void main(String args[])
{
System.out.println("Hello World");
}
}