JVM JRE JDK Data Types PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

JVM

JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime
environment in which java bytecode can be executed.

JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform
dependent because configuration of each OS differs. But, Java is platform independent.

The JVM performs following main tasks:

o Loads code

o Verifies code

o Executes code

o Provides runtime environment

JRE
JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It
is the implementation of JVM. It physically exists. It contains set of libraries + other files that
JVM uses at runtime.

Implementation of JVMs are also actively released by other companies besides Sun Micro
Systems.
JDK
JDK is an acronym for Java Development Kit.It physically exists.It contains JRE +
development tools.

Data Types in Java


Data types represent the different values to be stored in the variable. In java, there are two
types of data types:

o Primitive data types

o Non-primitive data types


Data Type Default Value Default size

boolean false 1 bit

char '\u0000' 2 byte

byte 0 1 byte

short 0 2 byte

int 0 4 byte

long 0L 8 byte

float 0.0f 4 byte

double 0.0d 8 byte


JVM(Java Virtual Machine): JVM is an abstract computing (virtual) machine. It provides a

platform- independent way of executing codes. If you are a java programmer, you can
concentrate on writing software, without having to be concerned with how and where it will run.

We all know that when we compile a Java file, we get the output as a '.class' file not an 'exe'. A

'.class' file contains Java Byte codes which are executed by Java Virtual Machine. Java Virtual

Machine interprets the byte code into the machine code depending on underlying operating

system and hardware combination. JVM is platform dependent and responsible for garbage
collection, array bound checking etc.

JDK (Java Development Kit): JDK is a container of tools which are needed to develop java

programs. It is an acronym stands for Java development kit. It contains JRE and development

tools where JRE is used to run the program. JDK facilitates a java programmer to write java
applets and application.

JDK contains the tools like:

compiler (javac.exe), java application launcher (java.exe), Appletviewer etc.

Compiler: It converts java code into byte code.

Java application launcher: It is used to open a JRE, load the class and invoke its main method.

JRE (Java Runtime Environment): JRE is an acronym which stands for Java Runtime
Environment. When the Java programming language was invented, it was not supported by all

operating systems so there was a need of Java Runtime Environment which make able to run
java applets and application after installing on your computer.

The JRE is developed by Sun Microsystems. It includes the JVM, code library and necessary
components used to run java program.

You might also like