Java Programming Language Tutorial

Java is a high-level object-oriented programming language originally developed by James Gosling at Sun Microsystems and released in 1995. Java programming language is easy to learn and it's syntax is similar to C++ programming language. Java is one of the most popular programming language.
Java programs are platform independent, once you write a java program it will run on a variety of platforms like Windows, Mac OS, and the various flavors of UNIX.

Java is one of the most popular programming language. Most major IT companies use Java based technology in one way or other. Java is fast, scalable, secure and platform independent due to which many enterprise server side applications are written in Java to process millions of requests per day. According to Sun Microsystems, 3 Billion devices uses Java.

Advantages of Java

Java is platform independent programming language. Hence, java program written in one platform can run in multiple platforms like desktop, embedded systems and mobile without any modifications. Java is guaranteed to be Write Once, Run Anywhere.

Types of Java Programs

Mobile Application
Java is used to create applications specific for mobile devices. Applications created in one mobile can run on all mobile devices having JVM. Java ME is used for creating mobile
applications. Most of the android apps are created using java.

Web Application
A web application is a program which runs on a remote server and delivers custom content to a client using web browser. Like ecommerce websites, social media websites etc. Java technologies like JSP, JBOS, Struts are used for creating web applications.

Standalone Application
It is also known as desktop application, which is stored and executed locally in computer. Such application needs to be installed on every computer like text editors, mp3 players, Image editing software etc. Currently, Swing and AWT are used for creating standalone desktop applications.

Enterprise Application
An enterprise application is generally distributed in nature, secure, scalable, mission-critical and designed to operate in a corporate environment such as business or government. For Banking applications, share trading applications etc. EJB is used for creating enterprise applications.

Features of Java

Simple
Java is a simple and easy to learn programming language. The syntax of java is similar to C++, hence it becomes to learn java for those who is already familiar with C and C++.
Java provides lots of programmer friendly libraries and features like automatic garbage collections and collections framework.

Platform Independent
Java programs are platform independent, unlike C and C++ programs. It means a program written in one hardware/software platform can run on other platforms also without any need of platform specific changes. For example, a program compiled in windows can also sun in UNIX, Solaris etc. Unlike C and C++, when a java program is compiled by the compiler it gets converted into platform independent bytecode. This bytecode can be interpreted by JVM of different platforms.

Object-Oriented
Java is a fully object oriented programming language unlike C++ which is object oriented extension of C. Every think is java is modeled as an Object. A java application contains of various objects interacting with each other. It supports popular object oriented programming concepts like encapsulation, inheritance, abstraction and polymorphism.

Architecture Neutral
Java compiler generates a generic and architecture neutral bytecode which is tied to any specific computer architecture. Whether it is 32 bit or 64 bit computer, same bytecode can can executed their respective java run-time environments.

Secured
Java provides various security features(which is a critical requirement for enterprise applications) like authentication techniques, encrypted data transfer, no pointer etc which makes a java application more secure difficult to hack. Unlike C and C++ programs which directly interacts with OS their is an extra layer of JVM between java application and operating system.

Portable
As java programs are platform independent and free of any architecture specific implementation, it can be executed in any platform having JVM.

Dynamic
Java programs are very agile and support dynamic loading. A java program can take lots of decisions on run-time and change its behavior accordingly.

High Performance
In comparison with C and C++, Java programs are little bit slower due to interpretation of bytecode by JVM. With the introduction of Just In Time compiler, java ensures high performance.

Distributed
RMI and EJB of Java is used for creating distributed web applications.

Multi-threaded
Using multi threading in java, we can write a java program which can perform multiple tasks at the same time. Java provides libraries to manage threads and thread pools. Using multiple threads can significantly improve the performance of java program.