Introduction to Java

  • Java
  • 4 mins read

Hello learners, in this topic we will discuss what is java. You will know about the characteristics of Java, why java is better than other languages, and finally, you will be familiar with the terms like JVM and JAVA API.

Java is a high-level, object-oriented, and case-sensitive programing language. Java was developed by James Gosling at Sun Microsystems Inc in the year 1995, later acquired by Oracle Corporation.

Java has the following properties/characteristics:

  1. Simple, Object Oriented, and Familiar
  2. Robust and Secure
  3. Architecture Neutral, Portable, and High Performance
  4. Interpreted, Threaded, and Dynamic

Java is Simple, Object-Oriented, and Familiar

Java is a simple programming language, it is easy to learn, and it uses most of the syntaxes which are similar to C/C++.

Java is an object-oriented programming language. Java technology provides a clean and efficient object-based development platform.

Even though C++ was rejected as an implementation language, keeping the Java programming language looking like C++ as far as possible results in it being a familiar language, while removing the unnecessary complexities of C++. Having the Java programming language retain many object-oriented features and the "look and feel" of C++ means that programmers can migrate easily to the Java platform and be productive quickly.

Java is Robust and Secure

The Java programming language is designed for creating highly reliable software. It provides extensive compile-time checking, followed by the second level of run-time checking.

The memory management module is simple, objects are created with the new operators,s and garbage are collected automatically when not in use. There are no user-defined pointer types.

Architecture Neutral, Portable, and High Performance of Java

The java programs are architecture-neutral and portable. They are built with a motto of Write Once, Run Anywhere. Your programs are the same on every platform--there are no data type incompatibilities across hardware and software architectures.

The architecture-neutral and portable language platform of Java technology are known as the Java virtual machine. It's the specification of an abstract machine for which Java programming language compilers can generate code. Specific implementations of the Java virtual machine for specific hardware and software platforms then provide the concrete realization of the virtual machine.

The java compiler generates the intermediate code called Byte Code. The Byte Code is machine independent and it is executed by Java Virtual Machine.

Java VM is available on many different operating systems, the same .class files are capable of running on different operating systems.

The Java platform achieves superior performance by adopting a scheme by which the interpreter can run at full speed without needing to check the run-time environment.

Java Interpreted, Threaded, and Dynamic System

The Java interpreter can execute Java bytecodes directly on any machine to which the interpreter and run-time system have been ported.

The java supports multiple threads. So, a program can execute multiple threads at the same time and utilize the CPU efficiently.

The java compiler is strict in compile-time checking, and the language and its runtime environment are dynamic in the linking stage. Classes are linked only at runtime.

The Java Platform

A platform is the hardware or software environment in which a program runs. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms.

The Java platform has two components:

  • The Java Virtual Machine
  • The Java Application Programming Interface (API)

Java Virtual Machine; it's the base for the Java platform and is ported onto various hardware-based platforms.

The API is a collection of ready-made software components that provide many useful capabilities. It is grouped into libraries of related classes and interfaces; these libraries are known as packages.