FEATURES OF JAVA:
- Java provides various features to the industry to develop distributed applications. They are:
1) Simple
2) Platform independent
3) Architectural neutral
4) Portable
5) Multithreaded
6) Distributed
7) Secured
8) Networked
9) Interpreted
11) Dynamic
12) High performance
13) OOPL
1) Simple:
- No use of pointers (free from pointers) means complexity reduces.
- Dynamic Memory Allocation.
- Automatic garbage collection
- User friendly syntax.
2)
Platform Independent:
- A program is said to be platform independent if and only if, it runs on every OS.
- The languages like C/C++ will run on only specific OS i.e. when we develop a C application on DOS, so that will be running on DOS only. It is not possible to transfer that application from DOS to UNIX even if we try to do the same we need to rebuild the application. Hence, the languages like C/C++ are treated as platform dependent languages.
- The languages like java will run on every OS irrespective to its provider.
- JVM converts one format to another format & thus we say that java is platform independent.
3) Architectural Neutral:
o A program is said to be an
architectural neutral, if and only if that program is running on every
processor, irrespective to their architectures.
4) Portable:
Portability = Platform Independent
+ Architectural Neutral
5) Multithreaded:
o Thread – flow of control is
known as a thread.
o The languages like C/C++ are
treated as Single Threaded Modeling Language (STML). Since there exist a single
flow of control. In single threaded modeling languages, the program will be
executing in sequential manner.
o The languages like Java and
Dot Net are treated as Multi Threaded Modeling Language (MTML). Since, there is
a possibility of existence the multiple flows of controls. In multithreaded
modeling languages, we can achieve concurrent execution. Hence, Java and Dot
Net languages are suitable for developing internet applications i.e.
distributed applications.
o When we write a java
application, by default there exist 2 types of threads. They are:
o Background Thread
o Foreground Thread
o A background thread is a
predefined thread or system defined thread which always executes to monitor the
status of foreground threads.
o Foreground threads are user
defined threads which will be executing by manual calls to perform a meaningful
operation.
On the other hand, Java is a
Multi-threaded language-
Class….
{
Public static void main (String
args[])
{
}
….
….
}
e.g.: gc () (Garbage
Collector)
Here, there are 2 threads
“main” an well as “gc()” which works concurrently.
Thus, we say Java is Multithreaded.
Also Garbage collector is a system Java program that
executes to monitor the execution of Foreground thread and is collects the unreferenced
memory spaces by running in periodic interval of time.
6) Distributed:
o
An application is said to be distributed, if and only if which can be
accessed across the globe.
o
A distributed service is one which runs in the context of browser or
many servers and accessible to across the globe.
o
To develop distributed applications, we require trusted network
architecture and it is preferred by large scale organizations.
o
Java supports to develop distributed applications. Hence, java is
distributed.
7) SECURED:
o Java is a secured language.
o To provide security to the
applications which we develop, we must use the security features already
developed by SUN Microsystems and supplied as a part of java software i.e. JDK.
8) Networked:
o Network is a collection of
connected autonomous and non-autonomous machines or nodes.
o We can have two types of
networks-
o Trusted Networks
o Un-trusted Networks
o A trusted network is one in
which all clients are not directly dependent on the server i.e. clients are
having the autonomous power. Trusted networks are used for developing
distributed applications.
o An un-trusted network is one
in which clients are directly dependent on the server i.e. without starting the
server, clients are unable to communicate. Such clients are known as non
autonomous clients. Un-trusted networks are used to develop centralized
distributed applications.
o A centralized distributed
application is one which always runs on single server.
For Example-
When we are connected to Internet and we open any
website like www.gmail.com, etc. then we need not to worry that the person at
server is there or not or etc, we always receive the page and we do not worry
anything. This is Trusted Network.
Hence, we can say JAVA IS
NETWORK.
9) Interpreted:
o Java is an interpreted
language since:
o Whenever we write a java
application, it must be compiled by submitting it to JVM (Java Virtual
Machine).
o After compilation, we get an
intermediate file with an extension “.class”. The “.class” file contains BYTE
CODES/Intermediate Codes.
o To run the “.class” file, we
need to submit it to JVM again and JVM will read it line by line hence, while
application is running, JVM is treated as Interpreter. Generally, interpreter
takes a lot of time compare to compilation but as a part of JVM a small program
called JIT (Just-in-time) is added. Hence, JVM will interpret the byte codes
very fast i.e. Interpretation will take very less time than the compilation in
the java environment.
o In Java Runtime Environment
(JRE), the JVM is treated as Compiler cum Interpreter.
o The following figure
describes the compilation and interpretation process in Java:
10) Robusted:
o
Java is a robusted language, because of the following reasons:
o Run time errors can be
processed effectively. Runtime errors are those which are occurring at runtime.
If we come across any error at runtime, such type of errors are known as
runtime errors or exceptions.
o Java contains readily
available Garbage Collector for collecting un-used or unreferenced memory
locations or improving the performance of java programming.
o Java programmer can develop
java applications without using the concept of pointers hence, application
development time is less and complexity will be reduced.
o Services are provided without
any interruptions. e.g.: All websites. 24x7 service is provided.
11) Dynamic:
- Java is a dynamic language because of the following reasons:
- Java always supports Dynamic Memory Allocation for avoiding the Static Memory Allocation problems.
- The websites which we develop using Java provides dynamic access to number of the clients i.e. any server side program can be accessed by n# of clients concurrently. There is no restriction for the number of clients.
12) High Performance:
- Java is a high performance language because whichever application we develop in java runtime environment is free from pointers and it will be converted in the form of pointers when get compiled.
- Any application which is executing with the concept of pointers will be having high performance.
- Java contains rich set of API (Application Programming Interface). If we use the predefined API as a part of our java application, its performance will be improved.
13) Object-Oriented Programming Language:
o Java supports, all the OOP’s
principle, so we can say that it is an Object Oriented Programming Language.

No comments:
Post a Comment