Java:- Introduction

Shubham Pandey
6 min readJan 23, 2021

The Creation of Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. in 1991. It took 18 months to develop the first working version. This language was initially called “Oak,” but was renamed “Java” in 1995. Now it is merged into Oracle Corporation. Java is used to develop Desktop Applications such as MediaPlayer, Antivirus, Develop Web Applications, Develop Enterprise Application such as Banking applications, Mobile Applications, Develop Embedded System, SmartCards, Robotics, Games, etc.

As per the sun microsystem standard, the java language is divided into three types.

1. J2SE/JSE (java 2 standard edition)

J2SE is used to develop standalone applications. Ex: — notepad, WordPad, Paint, Google Talk, etc.

2. J2EE/JEE (java 2 enterprise edition)

With J2EE we develop web-based applications. Ex: Gmail, yahoo mail, bank, reservation, etc.

3. J2ME/JME (java 2 micro edition)

By using J2ME we develop applications that only run on mobile devices.

Java is a class-based, object-oriented programming language.

A general-purpose programming language made for developers to write once run anywhere(WORA) that can run on any platform which has JDK installed in it.

Brief History About Java:-

It is a programming language created in 1991 by James Gosling, Mike Sheridan, and Patrick Naughton, a team of Sun engineers known as the Green team.

Sun Microsystems released its first public implementation in 1996 as Java 1.0. It provides no-cost -run-times on popular platforms.

With the arrival of Java 2.0, new versions had multiple configurations built for different types of platforms.

On November 13, 2006, Sun released much of its Java virtual machine as free, open-source software. On May 8, 2007, Sun finished the process, making all of its JVM’s core code available under open-source distribution terms.

Why is Java Programming language named Java??

After the name OAK, the team decided to give a new name to it and the suggested words were Silk, Jolt, revolutionary, DNA, dynamic, etc.

In accordance with James Gosling, Java the among the top names along with Silk, and since java was a unique name so most of them preferred it.

Java is the name of an island in Indonesia where the first coffee(named java coffee) was produced. And this name was chosen by James Gosling while having coffee near his office.

Java Terminology:-

1. Java Virtual Machine(JVM): This is generally referred to as JVM. There are three execution phases of a program. They are written, compile and run the program.

  • Writing a program is done by a java programmer.
  • The compilation is done by the JAVAC compiler which is a primary Java compiler included in the Java development kit (JDK). It takes Java program as input and generates bytecode as output.
  • In the Running phase of a program, JVM executes the bytecode generated by the compiler.

Every Operating System has a different JVM but the output they produce after the execution of bytecode is the same across all the operating systems. This is why Java is known as a platform-independent language.

2. Bytecode: the Javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. It is saved as a .class file by the compiler. To view the bytecode, a disassembler javap can be used.

3. Java Development Kit(JDK): In programming, we develop a program, compile, run or execute for output. To Develop and run the java application JDK is required. Java development kit includes everything including compiler, Java Runtime Environment (JRE), java debuggers, java docs etc. For the program to execute in java, we need to install JDK on our computer in order to create, compile and run the java program.

4. Java Runtime Environment (JRE): JDK includes JRE. JRE installation on our computers allow the java program to run, however, we cannot compile it. JRE includes a browser, JVM, applet supports, and plugins. For running the java program, a computer needs JRE. But just to run the java application only JRE is required. In JRE JVM is responsible to run a program line by line that’s why JVM is an interpreter.

5. Garbage Collector: In Java, programmers can’t delete the objects. To delete or recollect that memory JVM has a program called Garbage Collector. Garbage Collector can recollect the objects that are not referenced. So Java makes the life of a programmer easy by handling memory management. However, programmers should be careful about their code whether they are using objects that have been used for a long time. Because Garbage cannot recover the memory of objects being referenced.

6. ClassPath: The classpath is the file path where the java runtime and Java compiler looks for .class files to load. By default, JDK provides many libraries. If you want to include external libraries they should be added to the classpath. It describes the location where required class files are available. Compiler and JVM use a classpath to locate the required class.

JAVA Main Features:-

1. Simple:

Java is a simple programming language because:

• Java technology has eliminated all the difficult and confusion-oriented concepts like pointers, multiple inheritances in the java language.

• The c, CPP syntaxes easy to understand and easy to write. Java maintains C and CPP syntax mainly hence java is a simple language.

• Java tech takes less time to compile and execute the program.

2. Object-Oriented:

Java is object-oriented technology because to represent total data in the form of an object. By using object reference we call all the methods, variables which is present in that class.

The four main concepts of Object-Oriented programming are:

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism

3. Platform Independent:

Compile the Java program on one OS (operating system) and that compiled file can be executed in any OS (operating system) is called Platform Independent Nature. Java is a platform-independent language.

4. Architectural Neutral:

Java application compiled in one Architecture (hardware —RAM, Hard Disk) can run on any hardware architecture(hardware) is called Architectural Neutral.

5. Portable:

In Java tech, the applications are compiled and executed in any OS (operating system) and any Architecture(hardware) hence we can say java is a portable language.

6. Robust:

Any technology if it is good at two main areas it is said to be ROBUST

• Exception Handling.

• Memory Allocation.

JAVA is Robust because:

• JAVA has a good predefined Exception Handling mechanism.

• JAVA is having a very good memory management system that is Dynamic Memory (at runtime the memory is allocated) Allocation which allocates and deallocates memory for objects at runtime.

7. Secure

To provide implicit security Java provides one component inside JVM called Security Manager. To provide explicit security for the Java applications we are having a very good predefined library in the form of java.Security. package.

8. Multithreaded

Thread is a lightweight process and a small task in a large program. With Java’s multithreaded feature it is possible to write programs that can perform many tasks simultaneously.

9. Compiled and interpreted

Usually, a computer language is either compiled or interpreted but, java combines both these approaches. First, the Java compiler translates source code into what is known as bytecode instructions. Bytecode is into machine instructions and therefore, in the second stage, the java interpreter generates machine code that can be executed by a machine that is running the java program. Thus, java is both compiled and interpreted

The next topic is JVM and its architecture.

--

--