Features of Java Programming Language

In this article we will discuss on the major features of java programming language.
Features of Java Programming Language
1.1 Features of Java

Following are the features of JAVA that makes it powerful language.

1. Simple: Java was developed by adopting some of the best features from other programming languages such as C and C++. So Java utilizes the methodologies that are already proven. Error prone tasks such as pointers and memory management have either been eliminated or are handled by the Java environment automatically rather than by the programmer. Thus it is very simple to use.

2. Object Oriented: Even though Java has the look and feel of C++, it is a wholly independent language which has been designed to be object-oriented from the ground up. In object-oriented programming (OOP), data is treated as objects to which methods are applied. Java's basic execution unit is the class. Advantages of OOP include: reusability of code, extensibility and dynamic applications.

3. Distributed: Commonly used Internet protocols such as HTTP and FTP as well as calls for network access are built into Java. Internet programmers can call on the functions through the supplied libraries and be able to access files on the Internet as easily as writing to a local file system.

4. Interpreted: When Java code is compiled, the compiler outputs the Java Byte code which is an executable for the Java Virtual Machine. The Java Virtual Machine does not exist physically but is the specification for a hypothetical processor that can run Java code. The byte code is then run through a Java interpreter on any given platform that has the interpreter ported to it. The interpreter converts the code to the target hardware and executes it.

5. Robust: Java compels the programmer to be thorough. It carries out type checking at both compile and runtime making sure that every data structure has been clearly defined and typed. Java manages memory automatically by using an automatic garbage collector. The garbage collector runs as a low priority thread in the background keeping track of all objects and references to those objects in a Java program. When an object has no more references, the garbage collector tags it for removal and removes the object either when there is an immediate need for more memory or when the demand on processor cycles by the program is low.

6. Secure: The Java language has built-in capabilities to ensure that violations of security do not occur. At compile time, pointers and memory allocation are removed thereby eliminating the tools that a system breaker could use to gain access to system resources. Memory allocation is deferred until runtime. Even though the Java compiler produces only correct Java code, there is still the possibility of the code being tampered with between compilation and runtime. Java guards against this by using the byte code verifier to check the byte code for language compliance when the code first enters the interpreter, before it ever even gets the chance to run.

The byte code verifier ensures that the code does not do any of the following: Forge pointers, Violate access restrictions, incorrectly access classes, Overflow or underflow operand stack, Use incorrect parameters of byte code instructions, Use illegal data conversions. At runtime, the Java interpreter further ensures that classes loaded do not access the file system except in the manner permitted by the client or the user.

7. Architecturally Neutral: The Java compiler compiles source code to a stage which is intermediate between source and native machine code. This intermediate stage is known as the byte code, which is neutral. The byte code conforms to the specification of a hypothetical machine called the Java Virtual Machine and can be efficiently converted into native code for a particular processor.
8. Portable: By porting an interpreter for the Java Virtual Machine to any computer hardware/operating system, one is assured that all code compiled for it will run on that system. This forms the basis for Java's portability.

Another feature which Java employs in order to guarantee portability is by creating a single standard for data sizes irrespective of processor or operating system platforms.

9. High-Performance: The Java language supports many high-performance features such as multithreading, just-in-time compiling, and native code usage. Java has employed multithreading to help overcome the performance problems suffered by interpreted code as compared to native code. 

Since an executing program hardly ever uses CPU cycles 100 % of the time, Java uses the idle time to perform the necessary garbage cleanup and general system maintenance that renders traditional interpreters slow in executing applications. Since the byte code produced by the Java compiler from the corresponding source code is very close to machine code, it can be interpreted very efficiently on any platform. In cases where even greater performance is necessary than the interpreter can provide, just-in-time compilation can be employed whereby the code is compiled at run-time to native code before execution. An alternative to just-in-time compilation is to link in native C code. This yields even greater performance but is more burdensome on the programmer and reduces the portability of the code.

10. Dynamic: By connecting to the Internet, a user immediately has access to thousands of programs and other computers. During the execution of a program, Java can dynamically load classes that it requires either from the local hard drive, from another computer on the local area network or from a computer somewhere on the Internet.


Previous
Next Post »

If you have any kind of question about any post, Feel free to ask.You can simply drop a comment below post. Your feedback and suggestions will be highly appreciated. ConversionConversion EmoticonEmoticon