Introduction to Java

  • Java is an Object Oriented, Cross platform programming language
  • Java is used in various platforms like mobile devices, Smart watches and many other electronic items
  • The main advantage of java is that data cannot be accessed using external functions and new data and functions can be easily added.

Getting Started

Java is a general-purpose object oriented computer-programming language that is class based and concurrent, specifically designed to have as few implementation dependencies as possible.

This lets programmers and application developers write once, run anywhere meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.

Java applications are compiled to byte code’s that can run on any Java virtual machine (JVM) regardless of its computer architecture. Introduction-to-java

Java was originally developed by James Gosling and Patrick Naughton at Sun Microsystems (which was later acquired by Oracle Corporation). Java derives much of its syntax from C and C++ and also has many other important features.

History of Java

The development of Java originally was started by a team of 30 people led by James gosling and Patrick Naughton. They named this project as Green which was later changed to Java in course of time.

The main aim behind the implementation of Java is to build a programming laungage which can be used in electronic items, and also which has less execution time, less memory and power consumption.

They wanted the language to be Simple and robust, Architecture neutral.

Simple includes less execution time ( Ex: let’s consider we are switching through channels in our television if that takes more amount to time to switch from one channel to another then we might not like watching the TV, so here in this scenario the execution time has to be less).

Architecture neutral includes the program written once has to get executed in every Java supported device. We can refer it to as WORA ( Write Once Run Anywhere).

Major release versions of Java, along with their release dates:

  • JDK 1.0 (January 23, 1996)
  • JDK 1.0 (January 23, 1996)
  • JDK 1.0 (January 23, 1996)
  • JDK 1.1 (February 19, 1997)
  • J2SE 1.2 (December 8, 1998)
  • J2SE 1.3 (May 8, 2000)
  • J2SE 1.4 (February 6, 2002)
  • J2SE 5.0 (September 30, 2004)
  • Java SE 6 (December 11, 2006)
  • Java SE 7 (July 28, 2011)
  • Java SE 8 (March 18, 2014)
  • Java SE 9 (September 21, 2017)
  • Java SE 10 (March 20, 2018)
  • Java SE 11 (September 25, 2018)

Comparision of Java with other Programming Languages(C and C++)

C and C++ are static where Java is dynamic

C and C++ are static PL :
Static PL refers to the PL which allocates memory for primitive data types at compilation time. Most of you might get confused here referring that there are calloc() and malloc() functions for memory allocations.

Those are for explicit memory allocation (developer use), in context to default memory allocation the memory is allocated at compilation time.

Java is a dynamic PL :
Dynamic PL refers to PL which allocates memory for primitive data types at run time.

Difference between #include header files and import statements

Include statements are used define the header files in C Import is used to define packages in Java

#include statements are recognised by pre-processor and the specific header files are replaced by the code written in them Import statements are recognised by compiler and JVM

#include supports static memory loading Import supports dynamic memory loading

We can include only one header file using one include statement


We can include multiple packages using one import statement

import java.util.*;

Tight coded programming language

Let’s consider that we want to implement stack operations using C language, basically stack has three operations PUSH, POP and PEEK. PUSH is used to insert the data into the stack, POP is used to delete the data from the stack and PEEK is used to read the data present in the stack.

To complete this we require some 30-40 lines of code in C language. Let’s see how many lines of code we require to perform same operation using java.

Stack s = new stack();

That’s all we are done with the stack operations with only four lines of code.

So, here with we can define a PL as a Tight coded programming language if it takes less number of instructions to execute the complex requirements.

Advantages and real world usage of Java

Simple: Java is designed to be easy, simple and robust programming language which uses less memory and gives high performance.

Object-Oriented: Uses objects for memory allocation at run time.

Platform-Independent: We can move the Java programs from one system to another with ease.

Secure: The Java language, compiler, interpreter, and runtime environment were each developed with security in mind.

Allocation: This uses stack memory allocation where we can store and retrieve data in a much easier manner.

Multithreaded:we can perform simultaneous tasks with in a program with ease.

Types of Applications that Run on Java

1. Desktop GUI Applications:

Java provides GUI development through various means like Abstract Windowing Toolkit (AWT), Swing and JavaFX.

While AWT contains a number of pre-constructed components such as menu, button, list, and numerous third-party components, Swing, a GUI widget toolkit, additionally provides certain advanced components like trees, tables, scroll panes, tabbed panel and lists.

2. Mobile Applications:

Java Platform, Micro Edition (Java ME or J2ME) is a cross-platform framework used to design applications that run across all Java supported devices, including feature phones and smart phones.

Further, the applications for Android, one of the most popular mobile operating systems, are usually scripted in Java using the Android Software Development Kit (SDK) or other development environments.

3. Embedded Systems:

Embedded systems, ranging from tiny chips to specialized computers, are components of larger electromechanical systems performing dedicated tasks.

Several devices, such as SIM cards, blue-ray disk players, utility meters and televisions, use embedded Java technologies. According to Oracle, 100% of Blu-ray Disc Players and 125 million TV devices employ Java.

4. Web Applications:

Java provides support for web applications through Servlets, Struts or JSPs. The easy programming and higher security offered by the programming language has allowed a large number of government applications for health, social security, education and insurance to be based on Java.

Java also finds application in development of eCommerce web applications using open-source eCommerce platforms, such as Broadleaf.

5. Web Servers and Application Servers:

The Java ecosystem today contains multiple Java web servers and application servers.

While Apache Tomcat, Simple, Jo!, Rimfaxe Web Server (RWS) and Project Jigsaw dominate the web server space, WebLogic, WebSphere, and Jboss EAP dominate commercial application server space.

6. Enterprise Applications:

Java Enterprise Edition (Java EE) is a popular platform that provides API and runtime environment for scripting and running enterprise software, including network applications and web-services. Oracle claims Java is running in 97% of enterprise computers.

The higher performance guarantee and faster computing in Java has resulted in high frequency trading systems like Murex to be scripted in the language. It is also the backbone for a variety of banking applications which have Java running from front user end to back server end.

7. Scientific Applications:

Java is the choice of many software developers for writing applications involving scientific calculations and mathematical operations. These programs are generally considered to be fast and secure, have a higher degree of portability and low maintenance.

Applications like MATLAB use Java both for interacting user interface and as part of the core system.

About Author

This is Krishna.I am the author of this blog. I am a technology enthusiast. If you found this article helpful please share it with your friends. Please provide your valuable comments on this blog.

Share this Article Facebook
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions