Java Introduction

Introduction of Java:

Java is a platform as well as a programming language. It is designed and developed by James Gosling and Henry McGilton, and is an open source software.

Java as a programming language – java is a high level programming language which follows a pure object oriented programming methodology. We have number of features / benefits of using java technology; we will discuss each one of them in detail:
  1. Simple – Java is a syntactically simple and easily understandable programming language. Programmers can start working on java without extensive training; they can be productive from very beginning. All concepts of java can be grasped quickly and easily.
  2. Object Oriented – Java follows an object oriented programming methodology, which ensures that everything in java is treated as an object. We have a separate chapter to understand the Object Oriented Programming.
  3. Distributed - Developing your applications using the Java programming language results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance. A network based distributed socket programming is also allowed in java.
  4. Multithreaded – java technology’s multithreading capability ensures that multiple tasks can concurrently run in a single application. Multiple threads run at the same time performing several activities concurrently. We will discuss this concept in a separate Multithreading Chapter.
  5. Interpreted & Dynamic - java interpreter can execute the byte code in any machine to which the interpreter and runtime system is migrated. In an interpreted platform such as Java technology-based system, the link phase of a program is simple, incremental, and lightweight. We can benefit much faster development cycles.
  6. Portable & Architectural Neutral - We will discuss this feature in detail in immediate next chapter.
  7. High performance – performance is always a matter of concern. The java ensures the superior performance where the interpreter runs at a high speed without needing to check the runtime environment. The automatic garbage collector runs at background to cleanup unused objects which ensures high availability of memory when required.
  8. Robust & Secure – Java is designed to operate in distributed environment which means the security is a must. It is designed to produce highly reliable softwares. It provides an extensive compile time checking followed by a run time checking. The memory management in java is extremely simple, user is allowed to create a new object using new operator, and automatic garbage collection is mechanism which ensures that unused objects are cleaned up automatically on regular basis. No explicit programmer defined pointers are allowed in java so that there is no possibility of security breach. Java is robust because it is hard to break (automatic garbage collection and handle abnormal condition).
A java program is first written in a simple text file with “.java” extension, and then we have to compile it using “javac” compiler, after compilation, a “.class” file is generated. This .class contains the bytecode, which is a special unique code that is understandable by Java Virtual Machine. Java virtual machine is also known as Java Runtime Environment, it is a java environment which reads the bytecode and convert it in machine understandable format (binary).


Java as a platform – a platform is a hardware or software environment in which a program runs. The java is software only platform which runs on top of other hardware based platform.

Java platform has the components:

1. Java virtual machine (JVM) – JVM is base of java platform, it is ported onto various hardware based platforms. It is termed as a “Virtual Machine for java platform”. It contains an interpreter which converts the compiled bytecode into machine dependent code for the machines of different architecture or operating systems. Let’s understand the internal components of JVM with help of this diagram:


 2. Java Application Programming Interface (API) – The API is a large collection of software components that provides many helpful capabilities. It is grouped into the libraries of related classes and interfaces. These libraries are known as packages, they are bundled as .jar file (java archive).

Fig. - An overall architecture of java platform in a simple diagrammatic representation.


Download this chapter as a pdf





No comments:

Post a Comment