Saturday, 10 January 2015

Features of Java




 The features of Java, which makes Java a powerful, popular language, can be stated
briefly as:

1. Simple:
    Java is simple to learn and use. In Java it is easy to write and debug programs because
certain complex features like operator overloading, multiple inheritance, pointers, and
explicit memory de allocation are not present in Java language.

2. Robust and Secure:
    Two main reasons for program failure are related to:
  • Memory management is very easy since the de allocation is done by the garbage
    collector automatically (more on this later)
  • Run time errors in Java provides object oriented exception handling to manage run
    time errors (covered late in Exception Handling).
3. Multithread
    Java is a programming language designed for the distributed environment of the internet and helps to write interactive programs where in multiple tasks can be performed simultaneously thus making it a robust programming language. Java is inherently multithreaded as there can be multiple executing threads in a single Java program. For example Java program can run three applets on the same page, provided that each applet gets equal time from the CPU.

4. Interpreted:
    Java is an interpreted language. When we write a program it is compiled into a class file.The interpreter executes this class file. However the interpreters 30 years ago were interpreting the statement in textual form. It was a very slow process. Java interprets byte code hence it is considerably fast. Java gets all the advantages of interpretation without suffering from major disadvantages..

5. Architecture Neutral:
    Java is an Interpreter based language. With Java, the program need only be compiled once, and the code generated by the Java compiler can run on any platform (discussed in detail later). If you are writing software for the World Wide Web, being able to run the same program on many different systems is crucial to that program's success. Java is platform independent at both the source and the binary level. Java can be easily ported on any type of system and irrespective of the operating system being used. Java achieves this portability due to its feature of Implementation Independency.

6. Platform independent and Portable:
    Platform independence is one of the most significant advantages that Java has over other programming languages, particularly for systems that need to work on many different platforms. Java is platform-independent at both the source and the binary level. Platform-independence is a program’s capability of moving easily from one computer system to another. At the source level, Java’s primitive data types have consistent sizes across all development platforms. Java’s foundation class libraries make it easy to write code that can be moved from platform to platform without the need to rewrite it to work with that platform. Platform-independence doesn’t stop at the source level, however. Java binary files are also platform-independent and can run on multiple problems without the need to recompile the source. How does this work? Java binary files are actually in a form called byte codes. Byte codes are a set of instructions that looks a lot like some machine codes, but that is not specific to any one processor. Normally, when you compile a program written in C or in most other languages, the compiler translates your program into machine codes or processor instructions. Those instructions are specific to the processor your computer is running—so, for example, if you compile your code on a Pentium system, the resulting program will run only on other Pentium systems. If you want to use the same program on another system, you have to go back to your original source, get a compiler for that system, and recompile your code.

7. Distributed:
    Java is a distributed language as it can be used to create applications to communicate over the network. Java can communicate over the network because it supports TCP/IP (Transmission Control Protocol/Internet Protocol). The TCP/IP is a network communication protocol.

8. Dynamic:
    During run time of a Java program, the relevant information is required that is used to verify and resolve access to objects. This concept of providing run time information is referred to as dynamically linking the code. This feature of Java adds strength to the applet environment in which all fragments of bytecode are dynamically updated on a running system.

0 comments:

Post a Comment

Digital Marketing

Subscribe to RSS Feed Follow me on Twitter!