exampracticeonline.com
Java Features

Java Features

The prime reason behind creation of Java was to bring portability and security feature into a computer language.

Other than these two main java features, there are many other features of Java that make it such a unique and popular language. They are,

  1. Simple
  2. Object-Oriented
  3. Secured
  4. Robust
  5. Portable
  6. Dynamic
  7. Multi-Threaded
  8. Platform Independent
  9. Distributed
  10. Architecture Neutral
  11. Interpreted
  12. High Performance

 

4

Java Object-Oriented

Java is an object-oriented programming language. An Object-oriented programming has the following concepts that the Java language also has-

  1. Object and Class
  2. Polymorphism
  3. Inheritance
  4. Encapsulation

Simple

Java is a very simple language as it is derived from C++ and C. So a user who has learned the C and C++ programming can easily do it.

It is simple because of the following factors:

  • It is free from pointer due to this execution time of application is improved. 
  • It contains user friendly syntax for developing any applications.
  • It has Rich set of API (application protocol interface).
  • It has Garbage Collector which is always used to collect un-referenced (unused) objects for improving performance of a Java program.

Secured

Java is a more secure language compared to other language.Java is secured because:

4

  • Java has no explicit pointer.
  • Programs are run in a virtual machine sandbox.
  • Java adds a class loader which separates the classes for a package of the local file system from imported ones from a network.
  • It has a bytecode verifier which checks the code fragments for any illegal code that violate the access right.
  • It has Security Manager to determines what resources a class can access such as reading and writing to the local disk.

 In this language, all code is covered in byte code after compilation which is not readable by human.

 

Robust

Java is designed to eliminate certain types of programming errors. Java is strongly typed, which allows extensive compile-time error checking. It does not support memory pointers, which eliminates the possibility of overwriting memory and corrupting data. In addition, its automatic memory management (garbage collection) eliminates memory leaks and other problems associated with dynamic memory allocation/de-allocation.

Platform Independent

A program or technology is said to be platform independent if and only if which can run on all available operating systems with respect to its development and compilation. (Platform represents O.S).

Unlike other programming languages such as C, C++ etc which are compiled into platform specific machines. Java is guaranteed to be write-once, run-anywhere language.

4

 

Architectural Neutral

Java applications that are compiled to bytecodes can be interpreted by any system that implements the Java Virtual Machine. Since the Java Virtual Machine is supported across most operating systems, this means that Java applications are able to run on most platforms.

Portable

Java is portable because it facilitates you to carry the Java bytecode to any platform. It doesn't require any implementation.

Multi-threaded

A thread in any language is a different program that runs concurrently, this feature helps Java to handle multiple tasks simultaneously. Threads don’t occupy memory, it works on memory sharing.

High-performance

Java offers high performance because Java support below points:

  • This language uses Bytecode which is faster than ordinary pointer code so Performance of this language is high.
  • Garbage collector, collect the unused memory space and improve the performance of the application.
  • Java support multithreading, because of this time consuming process can be reduced to executing the program.
  • Java has no pointers so that using this language we can develop an application very easily.

Dynamic language

Java supports dynamic loading of classes (like "load on demand”), dynamic compilation, and automatic memory management (garbage collection).

Interpreted

Java is compiled to bytecodes, which are interpreted by a Java run-time environment.

Distributed

Java is distributed because it facilitates users to create distributed applications in Java. RMI and EJB are used for creating distributed applications. This feature of Java makes us able to access files by calling the methods from any machine on the internet.