Sunday, June 5, 2022

An Introduction to Java and Its History

JavaJava is currently one of the most influential programming languages. It all started in 1990, when an American company that was leading the revolution in the computer industry decided to gather its best engineers together to design and develop a product that would allow them to become an important player in the new emerging Internet world. 


James GoslingAmong those engineers was James Arthur Gosling, a Canadian computer scientist who is recognized as the “father” of the Java programming language. It would take five years of design, programming, and one rename (from Oak to Java because of trademark issues), but finally in 1996, Java 1.0 was released for Linux, Solaris, Mac, and Windows.

Sun Microsystems (Oracle) formally announced Java at a major conference in May 1995. Ordinarily, an event like this would not have generated much attention. However, Java generated immediate interest in the business community because of the phenomenal interest in the World Wide Web. 

Java is now used to create Web pages with dynamic and interactive content, to develop large-scale enterprise applications, to enhance the functionality of World Wide.

Need for Java

Java was developed due to the need for a platform neutral language that could be used to create software to be embedded in various consumer electronic devices, such as microwave ovens and remote controls. 

The program written in C and C++ are compiled for a particular piece of hardware and software and that program will not run on any other hardware or software. So we need C/C++ compilers one for each type of hardware to compile a single program. But compilers are expensive and time-consuming to create. So there is a need for platform neutral language. 

So that program compiled from that compiler can run on any hardware. This need led to the creation of Java.

Why Is Java Portable?

WORA


The idea is that the Java language is portable (or, more precisely, the compiled byte code is portable). You are sure that each VM requires a specific implementation for a certain hardware profile. However, once this effort has been made, the entire Java bytecode will be executed on this platform.

The Java source code is compiled in bytecode when the javac compiler is used. The bytecode is saved on the disk with the file extension .class.

Java is a compiled programming language, but instead of compiling directly to an executable machine code, it is compiled into an intermediate, binary format called JVM byte code. The byte code is compiled and / or interpreted to execute the program.

The Java platform differs from most other platforms in the sense that it is a software-based platform that runs on other hardware-based platforms. It has two components:

1. Runtime environment

2. API (Application Programming Interface)

Java code can be executed on several platforms, for example, Windows, Linux, Sun Solaris, Mac / OS, etc. The Java code is compiled by the compiler and converted into bytecode. This bytecode is a platform independent code because it can be executed on several platforms, that is, Write Once and Run Anywhere (WORA).

Java provides three distinct types of portability:


Source code portability: A certain Java program must produce identical results, CPU , of the operating system or the underlying Java compiler.

CPU architecture portability: Current Java compilers produce object code (called byte-code) to a CPU that does not yet exist. For each real CPU in which the Java programs must run, a Java interpreter or virtual machine, executes the J code. This nonexistent CPU allows the same object code to be executed in any CPU for which there is a Java interpreter.

OS / GUI: Java solves this problem by providing a set of library functions (contained in libraries provided by Java, such as awt, util and lang) that converse with an imaginary operating system and an imaginary GUI. Just as the JVM presents a virtual CPU, the Java libraries have a virtual operating system / GUI.

Where Java Is Used

Java derives its huge popularity from is platform independence. Java only needs a Java Runtime Environment (JRE) to be installed in order to work, regardless of whether it is installed in a desktop PC running Windows, Linux, or Unix, a Macintosh computer, a smartphone or a mainframe computer. Here are some common places you'll see Java.

Android Applications

Most Android applications use Java API or are written in Java, so much so that Java is often regarded as the official programming language for mobile app development.

Desktop GUI Applications

Many desktop applications are developed in Java. Swing, Abstract Windowing Toolkit (AWT) and JavaFX are the main tools used for easy GUI development.

Web-Based Applications

Java is often employed to develop a broad range of interactive websites and web-based apps found in the insurance, social security, education and health sectors.

Financial and Retail Services

Java is used to write transaction management and billing applications, as well as server-side applications.

Science and Research

Java is the scientific community’s favored language for a broad range of mathematical calculations and other scientific operations. It can deal with huge datasets and big data technologies since it’s used for MATLAB and the Hadoop MapReduce framework.


Why Is Java Important?

Java is one of the most popular programming languages used to create Web applications and platforms. It was designed for flexibility, allowing developers to write code that would run on any machine, regardless of architecture or platform. According to the Java home page, more than 1 billion computers and 3 billion mobile phones worldwide run Java.

 Use

Java is used to build applications and platforms for a number of devices, including computers, laptops, gaming consoles, Blu-ray players, car navigation systems, medical monitoring devices, parking meters, lottery terminals and smartphones. It is also a key language for networking, particularly for data centers that store and transfer Web-based data.

Applets

Java is also used to create miniature, dynamic programs that run alongside or are embedded within Web pages. These programs are called applets and can be used to display maps, weather, games or other interactive widgets or tools on a Web page.

Programming

Based on a C and C++-based syntax, Java is object-oriented and class-based. Developers adopt and use Java because code can be run securely on nearly any other platform, regardless of the operating system or architecture of the device, as long as the device has a Java Runtime Environment (JRE) installed. The JRE varies depending on the specific type of device, but essentially it runs a “virtual” machine, or environment, that translates the code into an application or program.

Java and JavaScript

Although their names are quite similar and they are both used to create dynamic tools and games on a Web page, Java and JavaScript are different languages. Java is more robust and can be used as the sole programming language for an application, while JavaScript is a lightweight scripting language that adds functionality -- like a Java applet -- onto a Web page.

No comments:

Post a Comment

JIT Details

Every programming language uses a compiler to convert the high-level language code into machine level binary code, because the system unders...