Wednesday, 17 May 2017

Features of java

1. Simple
2. Object oriented
3. Platform independent
4. Secured
5. Robust
6. High Performance
7. Multithreaded

Simple :

 * Java language syntax is based on C++  
 * removed many confusing and rarely-used features like explicit pointers, operator overloading etc.
  * No need to remove unreferenced objects in java because there is Automatic Garbage Collection in java.

Object oriented:
 *Object oriented programming(OOPs)is a methodology that provides some set of rules to development and maintenance the software.

 concepts of OOPs:
    Object
    Class
    Inheritance
    Polymorphism
    Abstraction
    Encapsulation

Platform independent:
* A platform is the hardware or software environment in which a program runs.
* java is software-based platform that runs on the top of other hardware-based platforms
* Java code can be run on multiple platforms e.g. Windows, Linux, Sun Solaris, Mac/OS etc.
* Java code is compiled by the compiler and converted into bytecode. 
* This bytecode is a platform independent code because it can be run on multiple platforms
* JVM read the bytecode and execute the instruction but the JVM is platform dependent.

Secured:

* No explicit pointer to leak a memory
* Java Programs run inside virtual machine sandbox

* Classloader used to separate the package for the classes of the local file system from those that are imported from network sources.
* Bytecode Verifier checks the code fragments for illegal code that can violate access right to objects.
* Security Manager determines what resources a class can access such as reading and writing to the local disk.

Robust
* Robust simply means strong.  
* No pointer in  java  
* There is automatic garbage collection in java. 
* There is exception handling and type checking mechanism in java

High-performance

* Java is faster than traditional interpretation since bytecode is "close" to native code still somewhat slower than a compiled language (e.g., C++)

Multi-threaded

* A thread is a single process of execution.
* Multi thread is a process of executing multiple threads at a time.
* The main advantage of multi-threading is that it doesn't occupy memory for each thread. 
* It shares a common memory area. 


Please let me know your feedback .

No comments: