Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

1 Java Notion

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Terminologies of Java

For an introduction to Java Programming, it is recommended to have some idea of the basic Java terms to help your
learning. Let’s have a quick look at them

1. Java Development Kit (JDK)


Generally referred to as JDK, this kit provides the functionality required to develop, compile and execute your java
application or program.

In short, we can say if we want to create, compile or run our java application, then JDK must be installed in our
system.

2. Java Runtime Environment (JRE)


The Java Runtime Environment provides the ability to execute our applications at runtime. It comes included with
the JDK. JRE installation ensures the smooth running of your java application.

However, it is not responsible for compiling a program. This is a unique aspect of JRE, a user does need to have a
complete JDK set up to run/use any Java application, only having the JRE will be sufficient as it provides support
through browsers, applets, and other plugins to run a java application

3. Java Virtual Machine (JVM)


Commonly referred to as JVM, Java Virtual Machine to say is an abstract machine that enables a computer to run
java programs as well as programs in other programming languages that are already compiled to java Bytecode.
There are two phases to this

The Java Compiler compiles the java source code and generates an intermediatory code. This intermediate code is
known as the Byte Code.

In the executing phase, this Byte Code is interpreted by the Java Interpreter and can be executed on any machine
running a JVM. So, JVM reifies execution and the JRE provides the environment for it.

4. Byte Code
As discussed above, the Java Compiler compiles the Java Source Code into an intermediate code. This is generally
saved as a .class File. This intermediate code is known as Byte Code and is an important aspect of Java as this makes
the Language Platform-Independent. This is a machine-independent code and can be read or executed by any
machine running a JVM.
5. Garbage Collection
Garbage Collection eases the work of a programmer. Its main job is to deallocate or delete unused references or
objects. Thus the programmer need not worry about deleting occupied memory resources or memory management.
If the reference is not used over a long period of time, the garbage collector will automatically delete it.

Features of Java:

 Simple: Java is easy to learn. It does not include concepts of pointers and
operator overloading that were available in C++.
 Object-Oriented: You can model everything into an object which has data and
behavior. Java has incorporated various object-oriented concepts such
as Abstraction, Encapsulation, Polymorphism, and inheritance.
 Platform independence: Java is a write-once, run-anywhere language. Once
you compile java code, you can run it on any machine. For example: If you
compile your code on Windows OS, you can easily run the same bytecode in
Linux.
 Portable: Java byte can be portable to any platform and can be executed on any
platform.
 Multi-threading: Java has provided a multithreading feature that will help you to
execute the various tasks in parallel. It has introduced an executor
framework that is more robust and easy to use.
 High performance: Java can not be as fast as C and C++ as it is interpreted
language but it has provided various features such as Just in time compiler to
increase performance.
 Secure: Unlike C, there is no concept of pointers in Java, as the user can try to
access the memory reference of certain objects which might pose a security
threat to those objects. This is why Java has eliminated pointers in use which
makes some security flaws impossible to exploit and makes it secure.

You might also like