Java Tutorial

Java is a high-level programming language introduced by Sun Microsystems in May 1995.

Java can run on multiple platforms, such as Windows, Mac OS and various other UNIX versions of the system.

This tutorial will give you a better understanding of the Java programming language through simple examples.

Most of the code for the mobile operating system Android is programmed in the Java programming language.

Java was developed in 1995 by Sun Microsystems (now a subsidiary of Oracle) . James Gosling is known as the father of Java. Before Java, its name was Oak . Since Oak was already a registered company, James Gosling and his team changed Oak’s name to Java.


Java Program Example

Let’s take a quick look at a Java programming example. A detailed description of the Hello Java example is provided on the next page.

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

Where use Java?

According to Sun, there are 3 billion devices running Java. There are many devices currently using Java. Some of them are as follows:

  1. Desktop applications such as acrobat readers, media players, antivirus software, etc.
  2. Web applications such as java.com etc.
  3. Enterprise applications, such as banking applications.
  4. mobile
  5. Embedded Systems
  6. smart card
  7. robot technology
  8. games etc

Types of Java Applications

There are four main 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 computer. Examples of standalone applications include Media Player, Antivirus, etc. AWT and Swing are used in Java to create standalone applications.

2) Network application

An application that runs on the server side and creates dynamic pages is called a web application. Currently, web applications are created in Java using technologies such as Servlet, JSP, Struts, Spring, Hibernate, JSF, etc.

3) Enterprise application

Applications that are distributed in nature, such as banking applications, etc., are called enterprise applications. It has the advantages of advanced security, load balancing and clustering. In Java, EJBs are used to create enterprise applications.

4) Mobile Apps

Apps created for mobile devices are called mobile apps. Currently, Android and Java ME are used to create mobile applications.


Java platform/version

Java has 4 platforms or versions:

1) Java SE (Java Standard Edition)

It is a Java programming platform. It contains Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.math, etc. It contains things like OOP, String, Regex, Exception, Inner Classes, Multithreading, I/O Streams, Networking, AWT, Swing, Reflection, Collection, etc.

2) Java EE (Java Enterprise Edition)

It is an enterprise platform mainly used to develop web and enterprise applications. It is built on top of the Java SE platform. It includes topics such as Servlet, JSP, Web Services, EJB, JPA, etc.

3) Java ME (Java Micro Edition)

It is a micro platform mainly used for developing mobile applications.

4)JavaFX

It is used to develop rich Internet applications. It uses a lightweight user interface API.


Prerequisites to learn Java

Before learning Java, if you have some basic knowledge of C/C++ programming language, you will learn faster and get started easily.