Java programming language

Java programming language

Introduction

Java programming language is an object-oriented and procedural language. Java supports automatic memory management and dynamic compilation. The native language of Java is C and C++.

Java programming language was first released by Sun Microsystems in 1995 by James A. Gosling. The first version of Java programming language was introduced in 1995 and it was called ‘Oak’. The programming develops mobile and desktop applications, games, web servers, application servers, database connections and many more. The application built in java does not require a browser to execute. This program is useful for developing stand-alone applications.

Java is platform-independent. It means a program written in one platform is able to execute any platforms. Java is useful in developing applets. Applets are useful in enhancing the user interface within that application. Applets provide GUI (Graphical User Interface) and object interaction to the users. Java applets run in the web browser with JVM. The source code compiled into JVM is bytecode. Java uses an interpreter which parse the bytecode and execute it to the computer.

java programming language

Features of java programming language

Simple and Secure

Java is simple. Java does not include complex features. It uses a bytecode. Java compiler converts the Java code into byte code. The bytecode verifier filters the bytecode and checks the available bugs. This makes java secure.


Object-oriented programming.

The benefit of OOP is it has the ability to reuse the defined objects and modify existing objects. It saves programming time. The main feature of OOP its reliability. With this OOP approach, data and the program can be packaged into a single unit called object.


Robust and portable.

Robust means reliable and strong. It applies strong memory management, exception handling etc. Java is portable. Java code can execute on all platforms. The java program is platform-independent.


Platform Independent.

Java is platform-independent. It is a different programming language. Reusing the code saves time and effort. A code can that has written in a specific platform can be reused in other platforms too.


Multi-threading and high performance.

The main purpose of multithreading is to offer synchronized execution of two or more parts of a program. Multithreading utilizes CPU time. This program uses multi-thread and has high performance.  It is an interpreted language programming language.



Structure of java programming language

java code


Data Types

Primitive Data Types

  • Boolean,
  • byte,
  • char,
  • double,
  • float,
  • int,
  • long,
  • short etc.

Reference Data Types

  • Array,
  • Class etc.

Operators

Arithmetic Operator

Operator Description
+ Addition
Subtraction
* Multiplication
/ Division
% Modulus

Relational Operator

Operator Description
Less than
Greater than
== Equal to
<= Less than or equal to
>= Greater than or equal to
!= Not equal to

Logical Operator

Operator Description
|| OR
& AND
! NOT

Assignment Operator

Operator Description
= Equals to

Increment / Decrement Operator

Operator Description
++ Increment
Decrement


Java Requirements

  • Click java.com for downloading java.
  • A text editor. E.g. notepad++, Eclipse, Netbeans, Android studio… etc.
  • Java development tools.
  • Other necessary java libraries.