Wednesday 9 November 2016

Features of Java Language

From the original Sun Java whitepaper: "Java is a simple object-oriented, distributed, interpreted, robust, secure, architecture-neutral , portable, high performance, multi-threaded, and dynamic language."

Java features are also know as Java Buzzword. Here are some original Java buzzwords....
  • Simple 
  • Secure
  • Portable
  • Object-Oriented
  • Robust
  • Multi threaded
  • Architectural neutral
  •  Interpreted
  • High performance
  • Distributed
  • Dynamic

Simple:
  •  Very simple C/C++ syntax , operators etc
  •  Java inherits many of the  object oriented features of C++.
  •  The core language is simpler than C++, no operator overloading, no pointers, and no multiple inheritance
  •  The way a java program deals with memory is much simpler than C and C++. 


Secure: 
  • Java achieves protection by confining a Java program to the Java execution environment (JVM) and not allowing it access to other parts of the computer. 
  • Java runtime Security Manager  can check which operations a particular piece of code is  allowed to do. As a result. java can run un-trusted code in a "sandbox" where, for example, it can draw to the screen but cannot access the local file system.



Portable: 
  • For Java "Write Once Run Anywhere" , and for most part this work. 
  • When you compile a Java program, a .class file (bytecode) is created, and you can run it on any platform e.g. Window, Linux, MAC.  
  • Not even a recompile is required , a Java executable can work, without change, on any Java enabled platform.
  

Object Oriented: 
  • Java is fundamentally based on the OOP notions of classes and objects.
  • Java uses a fundamental OOP type system that must be obeyed at compile-time and run-time.


Robust:

  Robust means reliable and Java is robust and secure as there are many  features which support this concept.
  • Crash Recovery
  • Exceptional Handling
  • Strict Run-time checking
  • No pointers
  • Memory Management  

Multithreaded:
  • Java  support multithreaded  programming, which allows you to write programs that do many things simultaneously.
  • Threads are important for multi-media , web applications etc.


Architecture-neutral:
  • Java is platform independent language.
  • There is no implementation dependent feature e.g size of primitive data type is fixed.
  • This was made with goal "write once; run anytime , any where , forever".

High Performance:
  • Java bytecode was designed so that it would be easy to translate directly into native machine code for very high performance by using a just-in-time compiler. 

 Distributed:
  • Java is designed for distributed environment of the Internet, because it handles TCP/IP protocols. 
  • The original version of Java(Oak) included features for intra address-space messaging. This allowed objects on two different computers to execute procedures remotely. Java revived these interfaces in a package called Remote Method Invocation(RMI).

 Dynamic:
  • Class and type information is kept around at runtime. This enables runtime loading and inspection of code in a very flexible way.

No comments:

Post a Comment

If you have any doubt please let me know

Methods in JAVA Language

 In general, a way may be thanks to perform some task. Similarly, the tactic in Java may be a collection of instructions that performs a sel...