Java Tutorial For Begineers

What is Java?

Java is an object oriented programming language. Where in Java runs in its own platform meaning Java does not run directly on the Operating system.

What is meant by platform in Java?

Platform in Java means this equation where

JRE = JVM + API

JRE = Java Runtime Environment

JVM = Java Virtual Machine

API = Group of Libraries or Application programming interface.

What is the use of JRE ?

JRE – Java Runtime Environment is needed for RunTime Environment to execute Java. It’s a physical entity.

What is the use of JVM?

A specialized software that provides the Execution environment. It is a virtual machine, it doesnot exists

Characteristics of Java :

1.Platform Independent: Java programs use the Java virtual machine as abstraction and do not access the operating system directly. This makes Java programs highly portable.

A java program which is standard complaint and follows certain rules which can be run unmodified on all supported platforms. E.g. Windows or Linux.

Two Things contribute to the platform independency of java programs :

Class File format
OS dependent JVM
–>Class file contains byte code(special instructions that are understandable to any kind of JVM.

–>JVM is a special s/w that executes class files. It interprets byte code of the class file into underlying operating system. JVM knows the host of the OS environment.

Object oriented Programming Language: Except the primitive data types, all elements in java are objects.

Strongly typed programming language: Java is strongly-typed, e.g. the types of the used variables must be predefined and conversion to other objects is relatively strict, e.g. must be done in most cases by the programmer.

Interpreted and compiled language: Java source code is transferred into the byte code format which does not depend on the target platform. These byte code instructions will be interpreted by the java virtual machine.The JVM contains the so called hotspot compiler which translates performance critical byte code instructions into later code instructions.

Automation memory management: Java manages the memory allocation and the deallocation for creating new objects. The program doesnot have direct access to the memory. The so called garbage collector deletes automatically objects to which no active pointer exists.

Leave a Comment

Your email address will not be published. Required fields are marked *