Compiled and interpreted
Platform – Independent
Object – Oriented
Robust and Secure
Distributed
Multithreaded
Dynamic and Extensible
Compiled and interpreted:-
Usually a computer language is either compiled or interpreted. Java combines both these approaches thus making Java a two stage system.
First, Java compiler translates sources code into what is known as byte code instruction. Byte codes are not machine instructions and therefore, in the second stage. Java interpreter generates machine code that can be directly executed by the machine that is running the Java program.
Object- Oriented:
Java is a true object – oriented language. Almost everything in Java is an object. All program code and data reside within object and classes.
Robust and Secure:
Java is a robust language. It provides many safeguards to ensure reliable code. It has strict compile time and run time checking for data types. It is designed as a garbage – collected language relieving the programmers virtually all memory management problems. Java also incorporates the concept of execution handling which captures series errors and eliminates any risk of crashing the system.
Java system not only verifies all memory access but also ensure that no viruses are communicated with an applet. The absence of pointer in Java ensures that programs cannot gain access to memory locations without proper authorization.
Distributed:
Java is designed as a distributed language for creating application on network. It has the ability to share both data and programs.
Multithreaded:
Multithreaded means handling multiple tasks simultaneously. Java supports multithreaded programs. This means that we need to wait for the application to finish one task before beginning another. For example, we can listen to an audio clip while scrolling a page and at the same time down load and applet from a distant computer. This feature greatly improves the interactive performance of graphical applications.
Platform- Independent:
The most significant contribution of Java over other languages is its portability. Java programs can be easily moved from one computer system to another anywhere and anytime. Changes and upgrades in operating systems, processors and system resources will not force any changes in Java programs. This is the reason why Java has become a popular language for programming on Internet which interconnects different kinds of systems worldwide. We can download a Java applet from a remote computer onto our local system via Internet and execute it locally. This makes the Internet an extension of the user’s basic system providing practically ultimate number of accessible applets and applications.
High Performance:
Java performance is impressive for an interpreted language, mainly due to the use of intermediate byte code. According to sun, Java speed is comparable to the native C/C++. Java architecture is also designed to reduce overheads during runtime. Further, the incorporation of multithreaded enhances the overall execution speed of Java programs.
Dynamic and Extensible:
Java is dynamic language; Java is capable of dynamically linking in new class libraries, method and object. Java can also determine the type of class through a query making it possible to either dynamically link or abort the program, depending on the response.
Java programs support functions written in other language such as C and C++. These functions are known as native methods. This facility enables the programs to use the efficient functions available in these languages. Native methods are linked dynamically at runtime.