×

Html & Html5

The World's best Software Development Study Portal

Java-Features

  1. Object-oriented
  2. Compiled and Interpretor
  3. Platform-independent
  4. Simple
  5. Secure
  6. Automatic memory management
  7. Portable
  8. Robust
  9. Multi-threading
feature

Object-oriented


Java is object-oriented programming language.It can be easily extended since it is a object base model.Everything in Java is object based. Basic concept of OOPs are:

  1. Object
  2. Class
  3. Inheritence
  4. Polymorphism
  5. Encapsulation
  6. Abstraction
  7. Message-passing

Compiler and Interpretor


Other languages(C/C++)need compiler or interpretor to convert high level language to low level.But Java use both.Program run in Java in 2 stages-

a.) Compiler convert Java program(code)into byte code or class file or intermediate code which is machine independent.

b.)In second stage Interpretor convert this byte code into real machine code. Inside interpretor JVM(Java virtual machine) is present which which interpret byte code according to platform.


Platform independent and portable


Java is platform independent i.e.Write Once Run Anywhere.Platform is the enviroment in which an application runs. In other words,it is combination of operating system and a CPU.For eg.Window 8+Intel-corei5.There are 2 types of platform to run application.

  • 1)Runtime Enviroment
  • 2)API(Application program Interface).
Being platform independent means application developed and compiled over one platform can be run or executed over another platform.Multiple platforms where Java code be run are Windows, Linux, Sun Solaris, Mac/OS, etc. Java code is compiled by the compiler and converted into bytecode(class file). This bytecode is a platform-independent code because it can be run on multiple platforms, i.e., Write Once and Run Anywhere(WORA).


Secure


Another important feature of Java is security.Reason for its security are-

  1. No Explicit Pointer i.e In Java like other languages(c/c++) no one can access system memory directly.
  2. Java program runs on JVM.If any problem occurs it remain in JVM and no effect on operating system.
  3. Before execution of program its code is check for safety,if any error occur its code is not executed


Simple


Java is designed to be easy to learn.Its syntax is same as of C++.But removal of certain aspects of programming like does't has pointer and overloading.


Automatic memory management


In languages like c/c++ has dynamic memory i.e programmer has to allocate/deallocate variables memory using new or delete operator.But Java uses automatic garbage collection feature where JVM itself deallocate any dynamic memory which our program allocate.


Multithreading


Multithreading is a process in which program is divide into several small parts called threads that are run concurrently.Each thread shares a common memory area.This type of feature is essential in multimedia like application.