What is Java

Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is know as the father of Java.

Platform: Any hardware or software environment in which a program runs, is known as a platform. Java has a run time environment (JRE) and API, it is called a platform.

First Code

class Example {     
    public static void main(String args[]) {     
             System.out.println("This is a simple Java program.");  
       }
 }

Types of Java Applications

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

1) Standalone Application

Standalone applications are also known as desktop applications or window-base applications. These are traditional software that we need to install on every machine.

2) Web Application

An application that runs on the server side and creates a dynamic page is call a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are use for creating web applications in Java.

3) Enterprise Application

An application that is distribute in nature, such as banking applications, etc. is call enterprise application. It has advantages of the high-level security, load balancing, and clustering.

4) Mobile Application

An application which is create for mobile devices is call a mobile application. Currently, Android and Java ME are use for creating mobile applications.

The Java Buzzwords

  • Simple
  • Secure
  • Portable
  • Object-oriented
  • Robust
  • Multithreaded
  • Architecture-neutral
  • Interpreted
  • High performance
  • Distributed
  • Dynamic

Object-Oriented

One outcome of this was a clean, usable, pragmatic approach to objects. Borrowing liberally from many seminal object-software environments of the last few decades, Java manages to strike a balance between the purist’s “everything is an object” paradigm and the pragmatist’s “stay out of my way” model.

Robust

The multiplatformed environment of the Web places extraordinary demands on a program, because the program must execute reliably in a variety of systems. To gain reliability, Java restricts you in a few key areas to force you to find your mistakes early in program development.

Multithreaded

To accomplish this, Java supports multithreaded programming, which allows you to write programs that do many things simultaneously. The Java run-time system comes with an elegant yet sophisticated solution for multiprocess synchronization that enables you to construct smoothly running interactive systems.

Interpreted and High Performance

As described earlier, Java enables the creation of cross-platform programs by compiling into an intermediate representation called Java bytecode. Most previous attempts at cross-platform solutions have done so at the expense of performance.

Distributed

In fact, accessing a resource using a URL is not much different from accessing a file. Java also supports Remote Method Invocation (RMI). This feature enables a program to invoke methods across a network.

Dynamic

This makes it possible to dynamically link code in a safe and expedient manner. This is crucial to the robustness of the Java environment, in which small fragments of byte code may be dynamically updated on a running system.